Skip to main content

All Questions

Tagged with
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 ...
RHOOPH's user avatar
  • 123
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. ...
RHOOPH's user avatar
  • 123
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/ ...
Quappas's user avatar
  • 15
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, ...
ZackT's user avatar
  • 93
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 /...
josmith42's user avatar
  • 198
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 ...
Andy3153's user avatar
  • 123
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/...
nelaaro's user avatar
  • 13.8k
7 votes
1 answer
2k views

Why is it not recommended to set the default shell of the root user to a non-POSIX shell?

I am going to change my root’s default shell from bash to fish. As far as I know, fish is a not a POSIX standard shell. On the other hand, maybe the kernel or other things in the system have a ...
Cy8099's user avatar
  • 193
1 vote
1 answer
840 views

Pipe in Environment variable in fish shell doesn't execute the first command?

I want to set fish_greeting to date --rfc-2822 | cowsay -f tux | lolcat (don't judge me). When I run date --rfc-2822 | cowsay -f tux | lolcat interactively, I get the proper output (the date in a ...
ZuluDeltaNiner's user avatar
2 votes
1 answer
752 views

Is administrator account necessary in order to use shells such as zsh and fish?

I have a weird situation. I’m using Mac OS X 10.11 (El Capitan) and iTerm2. Zsh is listed by default in /etc/shells as /bin/zsh, and this allows me to use Zsh without any issues on my standard ...
badfilms's user avatar
2 votes
3 answers
139 views

What's the fatest way to calculate in command line?

Is there a faster way to calculate in command line the following: echo "4 * 5" | bc
Texom512's user avatar
  • 131
2 votes
1 answer
1k views

writing more complex math input to fish shell

The fish documentation explains that the math command is essentially a thin wrapper to bc. The bc documentation has further info about more complex ops: If bc is invoked with the -l option, a math ...
bright-star's user avatar
  • 1,599
15 votes
3 answers
21k views

How do I install/make a custom prompt for fish shell?

I'm using fish 2.0 on Linux, but this might be an installation error, since my ~/.config/fish/config.fish is empty.
SuperCheezGi's user avatar