Questions tagged [fish]

The friendly interactive shell (fish) is a Unix shell that focuses on interactive use, discoverability, and user friendliness.

The friendly interactive shell (fish) is a Unix shell that focuses on interactive use, discoverability, and user friendliness. The design goal of fish is to give the user a rich set of powerful features in a way that is easy to discover, remember, and use.

193 questions
101
votes
2 answers

chain Fish commands via `&&` or `||`

In Bash/ZSH and other shells, I am used to using && and ||. Is there any equivalent in Fish?
Albert
  • 6,889
  • 11
  • 41
  • 53
70
votes
10 answers

Is there a “reverse incremental search” functionality in Fish similar to Bash’s CTRL+R?

I’m really impressed with Fish’s autocomplete functionality. However there is one feature in Bash that I’m unable to find in Fish. When you press Ctrl+R in Bash and begin to type out a term, a search is done on your .bash_history to find matches in…
user784637
  • 2,145
  • 9
  • 27
  • 29
70
votes
3 answers

Is there any way to get bash to have syntax highlighting like fish?

In the fish shell, the actual command line is syntax highlighted: Is there any way to get this same behavior in bash? There is something just like this but for zsh, not bash. Is it possible that this could be ported to bash? To clarify for those…
Wuffers
  • 19,619
53
votes
7 answers

What is the equivalent of bash's !$ and !! in the fish shell?

I've been using bash for a decade or so and have gotten used to being able to type !$ to repeat the last argument, e.g.: $ mkdir foo $ cd !$ cd foo (That last line is printed by the shell to tell you what your command evaluated to). Likewise I…
50
votes
11 answers

re-use '~/.profile` for Fish?

(I'm talking about the shell Fish, esp. Fish's Fish.) For Bash/ZSH, I had ~/.profile with some exports, aliases and other stuff. I don't want to have a separate config for environment variables for Fish, I want to re-use my ~/.profile. How? In The…
Albert
  • 6,889
  • 11
  • 41
  • 53
46
votes
8 answers

How to remove a path from $PATH variable in fish?

I am using fish as my shell in Debian and recently (after some upgrade) whenever I try to use command completion I have: set: No such file or directory set: Could not add component /usr/lib/x86_64-linux-gnu/libfm to PATH. set: No such file or…
tomekK
  • 561
25
votes
1 answer

How to keep terminal window title in sync with tmux window

I am using a program called "Timing" to track my time. Timing uses the name of the current window in iTerm for categorization purposes. I'd like to set the current title of iTerm to match the name of the currently active tmux window. I've set up a…
24
votes
2 answers

Is there a way to "source" a sh script from the fish shell?

I like to put many of my environment variable definitions in the .profile script. If I am using a POSIX-compatible interactive shell like bash, I can use the source command to re-export the environment variables from .profile when it gets updated,…
hugomg
  • 699
24
votes
2 answers

Why am I having / how can I fix this error: "shell_session_update: command not found"

Background I am getting into Ruby 2.x, and Rails 4.x, on a MacBook using OS X El Capitan (10.11.3), using the fish shell, employing the integration listed on this page: RVM - Fish Shell (Integration) Problem When executing various commands such as…
Pysis
  • 1,100
23
votes
3 answers

How do I change EDITOR to be Pico in fish shell?

I can’t get Mercurial (hg) to use pico as my EDITOR when I’m using fish shell. I’ve tried using this and other variations, but nothing seems to help: set -U EDITOR pico hg commit will always open vi as the editor, and I do not want that. UPDATE:…
20
votes
3 answers

Make bash as close to fish as possible

I love the fish shell and use it exclusively in MacOS but I use bash everywhere else because its the only thing installed. Having felt the pain of maintaining configuration files for the two shells, I've decided to stop using fish, and fall back to…
gnzlbg
  • 301
19
votes
3 answers

How to do command substitution in fish shell?

How would a Bash (or other POSIX shell) command like this have to be expressed in fish? ls -l $(which vim) # or ls -l `which vim`
Raffael
  • 1,251
19
votes
4 answers

sudo keeps asking me for my password in fish shell

sudo in Ubuntu keeps asking me for my password for every command. Previously, I only had to enter the password once, and then it would be remembered for a period of time. This recently changed, probably after "upgrading" to Natty. I've done sudo…
endolith
  • 7,704
18
votes
3 answers

How to run a command in background with no output unless there's an error

How to suppress a command's output but show it if the command exit codes an error?
Xster
  • 3,025
17
votes
5 answers

How do you "source" a file in fish?

I'd like to use keychain with the fish shell, but I'm not sure how to get fish to load the ~/.keychain/hostname-fish file to set the appropriate environment variables. In bash, there's the "source" command, but it doesn't exist in fish.
1
2 3
12 13