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

learn more… | top users | synonyms

9
votes
4answers
3k views

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 ...
0
votes
0answers
29 views

Creating an alias for in fish shell: The file 'vim' is not executable by this user

I'm trying to create an alias for vim to execute vimx. After creating a new terminal when I try to auto complete vi, I get the following error: fish: The file 'vim' is not executable by this user ...
1
vote
0answers
25 views

How to get fish-style formatting with less [edit] [edit]

Let's say I run a command like ls in fish and get lots of output, how do I scroll through it and still keep the fish formatting or something like it? ls | less doesn't keep the formatting. [edit] I ...
1
vote
1answer
158 views

How to get Fish shell and NVM both installed with Homebrew to work together?

I am trying to manage my packages for OSX using Homebrew as much a I can. I have installed both the Fish Shell and NVM using Homebrew but cannot get Fish to recognize my NVM installation. NVM ...
2
votes
3answers
62 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
9
votes
3answers
1k views

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 ...
11
votes
3answers
1k views

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?
1
vote
0answers
17 views

RVM is not a function message when using fish shell

I'm trying to use rvm from within the fish shell rvm gemset use rails3 I'm getting the following error message from fish RVM is not a function, selecting rubies with 'rvm use ...' will not work. ...
0
votes
2answers
16 views

Can a fish script distinguish between being sourced and executed?

I have a fish script that exports some variables and launches a command at the end. I'd like to be able to source this file to bring these variables into the current shell session, but without ...
0
votes
0answers
9 views

Let ctrl-c end entire fish function instead of one command in the function?

When executing a multi-line fish function, is there a way to let ctrl-c terminate the entire fish function instead of terminating just the currently running command in the function and letting the ...
0
votes
0answers
20 views

using FISH shell — set default folder for multiple tabs?

I'm using fish shell in OS X. Using the standard bash shell, you can open multiple tabs in Terminal, cd to a different directory in each, and then save the setup as a Window Group (via Window > ...
2
votes
2answers
421 views

How to remove 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 ...
2
votes
2answers
3k views

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" ...
1
vote
1answer
59 views

How do I get fish shell prompt to show the hostname?

I'm attempting to make my Fish prompt look like the old Gentoo shell did. user@hostname ~ % where the user@hostname is green, and the $PWD and symbol were blue. Right now it only shows: user@ ~ %, ...
9
votes
3answers
2k views

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 ...
1
vote
1answer
37 views

Escape-backspace behavior in fish shell like in other shells

I recently started using the fish shell for some things and generally like it. However I've run across one situation that would be great if there were a workaround. Say I typed a command like this: ...
0
votes
1answer
41 views

Fish Shell STDERR not outputted by default

I am using the fish shell, which until this moment had been a perfect replacement of the good old bash, but I came across the following problem. fish does not forward STDERR to STDOUT. Of course if I ...
0
votes
2answers
49 views

Run git command from an external directory in fish function

In a fish function, can I run a command from a certain directory without changing into it? or Can I run a git command (push) from outside the repository by specifying its path somehow? I'd like ...
1
vote
1answer
20 views

$status in Fish prompt always prints 0

I tried to add $status to my prompt in the fish shell but it always prints 0. This question was asked on irc a while back and i'm surprised there wasn't a answer here so i thought i'd post it here ...
2
votes
2answers
1k views

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 ...
1
vote
1answer
156 views

How can I enable tab completion for a fish function/alias?

Probably easier to just use an example here. I have a function ss that just calls: sudo systemctl $argv Tab completion works fine with the full command, but not for the ss function. I.e., ss start ...
0
votes
1answer
62 views

Custom bash 'context' when running from FISH

First of all, I'm on OSX10. My default shell is BASH, which I have set up (through .profile and .bashrc) to automatically run the FISH shell when I open my terminal emulator. This allows me to set up ...
22
votes
2answers
7k views

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 ...
1
vote
1answer
135 views

How to get byobu help screen (shift-F1) to work under a fish login shell?

I can get the Shift-F1 to show the help for a user that has fish as login shell. I get a glimpse of an error message that gets quickly overwritten. It says fish: Variables may not be used as ...
2
votes
1answer
225 views

How do I run make && make install while in fish shell

I have installed the fish shell, and I'm very happy with it ... but I cannot run the following command: make && make install This works nicely in bash... How do I run it in fish shell?
1
vote
1answer
490 views

How to set fish as default shell in Cygwin?

I installed fish and can start it. Now I would like to use it as my default shell in Cygwin. How may I achieve this? So far I tried two thing. I overwrote the content of /etc/shells with /bin/fish ...
1
vote
1answer
344 views

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 ...
27
votes
1answer
4k views

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

In Bash/ZSH and other shells, I am used to using && and ||. Is there any equivalent in Fish?
0
votes
0answers
31 views

Cygwin fish mutiline prompt

I've got a multiline prompt in fish which works fine on Ubuntu, but not on Cygwin. Each time I press a button the prompt is reprinted except for the last line. My guess is that cygwin deletes the ...
2
votes
1answer
150 views

Can't start new fish session after incorrectly closing fish_config

I'm trying out fish (the friendly interactive shell), and tried out the browser-based config with fish_config. I didn't close this correctly. I hit ctrl-C in my shell. Now I see the error "The ...
1
vote
0answers
32 views

How to refer to absolute paths in fish?

I'm trying to get fish to recognize an absolute path, either when changing directories or when giving an input to a program. I'm used to typing an absolute path as "C:/..." but in fish the only way I ...
0
votes
1answer
132 views

“.” command doesn't work in fish

I'm using fish and I'm trying to activate a virtual env, so I tried "source" command which apparently is not available in fish. And I ended up with this link which says: ". (a single period) is an ...
1
vote
2answers
253 views

Fish shell syntax highlighting looks weird in byobu-screen

When I am in plain fish shell, a command is highlighted like so: but when I am in byobu-screen and type the same thing, I get: When I do a fish_config and look at my color palette, nothing is ...
2
votes
0answers
303 views

My custom fish shell prompt keeps resetting every reboot

I switched to fish shell a month ago and I'm quite pleased with it. But recently, my custom prompt keeps resetting to the default prompt every time I turn on my PC. When opening the terminal, I'm ...
9
votes
1answer
545 views

Bind shift-tab to complete-backward in fish

I found myself using the auto-complete functionality of the fish-shell, where pressing tab twice or more cycles through the suggestions. But then I accidentaly pressed tab once to many, and I wanted ...
10
votes
4answers
4k views

$PATH is driving me nuts

OK, apologies if this is something dumb, but I'm running out of ideas. Goal: prepend /usr/local/bin to $PATH Problem: $PATH won't do what I want or expect How I got here: I want to start learning ...
1
vote
1answer
91 views

Change prompt on command line?

My prompt is quite verbose - which is good most of the time - but now I would like to switch it temporarily because I want to make a screen shot of the terminal. For that purpose I would prefer not to ...
0
votes
1answer
1k views

How can I setup fish shell prompt to be in a different color?

I've seen a screenshot of zsh configured to have prompt with a different color and background, and it looks like a very usable tweak:
0
votes
1answer
75 views

How to pin information to the top of a terminal window on Mac OSX

I've seen demos where folks have had a Mac OSX terminal where the current time + username + directory are afixed (like 'freeze rows' in excel) to the top of the terminal window (not in the title bar), ...
2
votes
1answer
202 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 ...
1
vote
1answer
272 views

How to do command substitution in fish shell?

How would a command like this have to be expressed in fish? ls -l $(which vim)
0
votes
1answer
827 views

Setting window title with iTerm and Fish

I want to set up a custom profile in iTerm2 that connects directly to a remote machine in tmux, with some custom SSH arguments. I have a fish function that does this, called "ss". When I have this ...
3
votes
1answer
285 views

How can I do string manipulation in fish shell

How can I do bash style string manipulations in Fish shell? Specifically, in bash read branch < ".git/HEAD" branch=${branch#ref: refs/heads/} will put the branch name in $branch variable. How ...
0
votes
1answer
32 views

How to sync fish's universal variables across different computers?

If you change some universal variables, how do you sync them across computers? The comments on the fishd.* files make it seem like a bad idea to sync those files. And fishd's man pages don't seem to ...
11
votes
3answers
3k views

How to use fish shell in cygwin?

Is it possible to use the fish shell with cygwin? I wasn't able to compile the source in cygwin, and I didn't find any precompiled packages. Is there a good reason for not having fish in cygwin?
3
votes
1answer
191 views

Quote or bracket completion in bash, without pressing TAB

Is there any way to have bash autocomplete matching symbols like '"[{( with their right handed counterparts? I would like to do this without having to press tab. For example typing the string echo " ...
24
votes
3answers
18k views

What are the differences between fish and zsh? [closed]

I'm a bash user willing to switch to a more friendly and advanced shell. I read a lot of good things about zsh, but I gave a quick test at fish and it seems great too. Both seem very close in term of ...
18
votes
4answers
4k views

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, ...
0
votes
1answer
1k views

Specifying an alternate shell with rsync

I'm using rsync to sync up files between two computers. On one machine, my default shell is set to fish, which breaks rsync ("protocol version mismatch -- is your shell clean?"). Is there a way to ...
3
votes
2answers
850 views

Go-lang go tool works with Bash but not Fish

For those of you who have no idea what Fish is: http://fishshell.com/ Similarly, if you are not familiar with a Go coding environment and still wish to try and figure out this small puzzle, here is ...