All Questions
69
questions
1
vote
2
answers
97
views
Show long commands in fish (ctrl+r) history on multiple lines
I'm looking for a solution to searching history with fish when your history is full of long commands. I often have curl commands that contain json payloads in my history that I want to repeat, for ...
5
votes
2
answers
921
views
How to split a string (of arguments) in fish?
I want to split "-r --run" into "-r" and "--run"
for
string split " " "-r --run"
I get
string split: -r --run: unknown option` as an error
It is ...
3
votes
2
answers
1k
views
How to save abbreviation in fish?
Running abbr --add ro rpm-ostree will set the abbreviation and it works as expected. But once I exit the shell with exit and then re-enter the shell by typing fish again, all abbreviations are lost. ...
1
vote
1
answer
540
views
Preserve command history in chronological order (in fish)
I have noticed that default behaviour for storing command history is only storing the latest entry.
Typing ls and then ls -al and then entering history would show:
ls -al
ls
Typing ls once more would ...
-1
votes
1
answer
595
views
How do I launch the fish shell in WSL through Cmder?
Setting it as the default shell in Ubuntu WSL results in the PATH not working properly, as described in the docs. So I want to avoid that issue by launching it through the terminal.
3
votes
1
answer
1k
views
I deleted fish shell and now VS Code terminal doesn't work
I have been working on a tutorial in Angular. Everything was working fine before I went to work today. I came back to my home computer after work today and the fish shell I was using within VS code ...
1
vote
1
answer
1k
views
tmux changes shell prompt
Ubuntu 20.04 (running inside VirtualBox, if that's important.)
tmux 3.0a (installed via apt)
fish 3.4 (and earlier 3.3)
starship.rs 1.1.1
Font: FiraCode Mono
I have configured my prompt to look as ...
2
votes
2
answers
2k
views
Accidentally deleted fish while it was being set as my shell - what can I do?
I'm on macOS and I accidentally removed /usr/local/bin/fish while fish was being set as my shell.
Now when I try to start my terminal I get:
login: /usr/local/bin/fish: No such file or directory
What ...
1
vote
1
answer
714
views
How to remove leading file path information from fish shell tab-complete suggestions?
Using fish, typing ls <tab> in an example directory, the terminal displays:
$ ls
bar/ dir/ foo/
Continuing with d<tab><tab> this becomes:
$ ls dir/
dir/moredir/ dir/otherdir/ ...
0
votes
2
answers
2k
views
Fish shell: Set variable outside of current shell
I would like to create the variable $EIGENto save the path where I installed the Eigen library in order to link in with my compiler. For this I was using set EIGEN path/to/eigen
However if I echo $...
0
votes
0
answers
109
views
Fish shell alternates between prepending ~ and > depending on which directory I am in
I'm new to using the Fish shell; however, I'm observing some strange behaviour when I navigate between directories.
Below is the output of my shell.
Initially, all commands are prepended with ~; ...
0
votes
1
answer
286
views
Is it possible to have an abbreviation in a shell anywhere in a command?
I have a directory which has a really long path. However, I use this directory constantly and I cannot move it (WSL Windows directory). I generally use z to jump around to it quickly which is useful, ...
1
vote
1
answer
62
views
distinguish C-i from Tab in Fish?
My fish configuration contains following bindings:
bind \ci nextd-or-forward-word
bind \co prevd-or-backward-word
bind \t complete
When I comment out complete then directory navigation to works as ...
1
vote
2
answers
370
views
Why fish shell does not allow function named `-`
I am trying to use fish as my default interactive shell. I was previously using bash and there was support for alias named - (ASCII hyphen, 0x2d). Why does not fish allow creation of alias or function ...
2
votes
1
answer
1k
views
How to I persist prepended items to PATH in fish shell?
My PATH Prefixes Don't Persist
I'm using Fish v3.2.0. According to the documentation, set -U fish_user_paths should persistently ensure that the directories stored in it should be looked up before ...
6
votes
2
answers
2k
views
How can I ask `fish` to enumerate all the locations it's reading configuration from?
When I start fish, I'd like it to print every location it's reading configuration, profiles, and customizations from, so that I can:
understand which specific paths I need to backup if I want to ...
0
votes
0
answers
3k
views
MobaXTerm “Follow Terminal Folder” STFP & Fish Shell
MobaXterm's "Follow Terminal Folder"/"Follow SSH Path" feature works great when remote SSH into a linux computer, it shows directory & files to the left as you work in the ...
3
votes
2
answers
3k
views
Execute two or more commands simultaneously in shell script
It is often very helpful to run commands in parallel in a shell script, but I cannot find ways to do it. Is this possible? If so, how would I achieve that? I'm mainly interested in doing that for fish....
1
vote
1
answer
2k
views
tmux run a pipe/chain of commands with keybinding
How can I run a chain of command like in shells with tmux? I want to run multiple commands based on success of them. I want to echo out to terminal (or command bar)
E.g. I have a keybinding to reload ...
4
votes
1
answer
3k
views
/bin/bash shell (macOS) throwing `-bash: declare: -A: invalid option` error message at shell start
I briefly changed my default shell on macOS Catalina (10.15.1) to Fish, following the steps in Fish's documentation.
First, I executed > echo /usr/local/bin/fish | sudo tee -a /etc/shells followed ...
1
vote
1
answer
1k
views
how to enable command line navigation shortcuts in fish shell running in iTerm on Mac
Setup: MacOs Mojave, iTerm, Fish shell 3.0.2, using fisher have theme bob-the-fish installed as well.
Would like to be able to use command line navigation keyboard shortcuts such as ctrl-A to get t ...
3
votes
1
answer
109
views
Fish: Concise way to output elements of list on separate lines
I am wondering if there is a concise way to output the elements of a fish list on separate lines.
I know I can do e.g. echo $PATH | tr ' ' '\n' to achieve the desired output, e.g.:
/usr/local/sbin
/...
6
votes
1
answer
3k
views
What's the easiest way to prepend the current time to the fish prompt?
I'd like to see the current time in my fish prompt so that I can always see for example when I started the last command. I don't want to install extensions.
0
votes
0
answers
223
views
Can't find command after setting PATH in fish
I'm struggling to add /usr/local/bin to my PATH so I can use geckodriver, which is located in /usr/local/bin/geckodriver. I tried the to add the following to my config.fish
set -U fish_user_paths /...
3
votes
3
answers
2k
views
Powerline and Fish: How can I remove the large whitespace between the shell prompt and cursor?
I recently started using Arch Linux and just installed Powerline and Fish (version 3.0.0) last week. In my terminal, which is Termite (version 14), there's a large (horizontal) space between the shell ...
1
vote
2
answers
2k
views
Running command for bash in fish shell
I'm trying to identify all the large files in my git repo history and came across this command posted here.
git rev-list --objects --all \
| git cat-file --batch-check='%(objecttype) %(objectname) %(...
2
votes
1
answer
599
views
Fish Shell - Virtualenv path not prepended to PATH
I am on a Mac running macOS Mojave. I run Iterm2 for terminal and fish version 3.0.0. I also use pipenv to manage my local development.
I have this problem where when I activate a python virtual env, ...
2
votes
2
answers
2k
views
Failed to login after setting fish as default shell
I tried fish for a while, and then i wanted to set it as my default shell. I edited /etc/passwd and changed the shell of my user to /bin/fish.
The problem is I couldn't login anymore. I tried through ...
1
vote
1
answer
197
views
Setup different path for fish shell temporally
User libraries are normally in /usr/local/lib. However I want to build some third party libraries in for example /Users/user/Public/lib.
I only want to do it during my testing. Is there a elegant way ...
2
votes
1
answer
713
views
how to open tcp connection in fish shell
I am looking for a way to open TCP connections in fish shell.
In bash, I can do the following to open a TCP connection. This is quick telnet type test when telnet is not installed.
$ echo > /dev/...