Questions tagged [fish]
The friendly interactive shell (fish) is a Unix shell that focuses on interactive use, discoverability, and user friendliness.
187
questions
1
vote
1
answer
4k
views
Change color of hostname in Fish shell prompt
I'm migrating to a new Mac, and I'm having trouble setting up my shell to match the old one.
Old:
New:
Notice the host color is different? I copied the entire .config/fish folder over to the ...
0
votes
1
answer
458
views
i3wm urxvt wrapping issue when using hot key to launch. no issue when run from dmenu
Sorry for the long title. Wanted it be a little specific. I have an issue with my urxvt (rxvt-unicode) terminal emulator that's using a themed fish shell. The problem is that when I launch urxvt with ...
0
votes
1
answer
2k
views
fish shell how do you check for root
Is there a way to assert the current "user" is root (i.e. the script was run by root) using the fish shell?
I know for bash you can check the EUID
0
votes
1
answer
1k
views
Reveal user@hostname in oh-my-fish theme
I'm trying to have the user@hostname displayed all the time in fish's bobthefish theme, no matter whether you're the default user or not. I've tried editing ~/.config/fish/functions/fish_prompt.fish, ...
2
votes
2
answers
143
views
Combining functions in Fish
In Fish shell I have two functions:
function be
bundle exec $argv
end
function rdbm
rake db:migrate
end
I typically use them together, i.e. bundle exec rake db:migrate but not always, so I'd ...
11
votes
3
answers
19k
views
Reuse .bash_profile for Fish in Mac
I'm using iTerm on my Mac and I have a .bash_profile that I have been comfortably using. I recently got to know about fish bash and I installed it on my Mac and all of a sudden my .bash_profile is not ...
2
votes
1
answer
1k
views
How to show fish shell completions in a menu and window pressing tab
Currently fish shell (2.3.1) shows the completion list after pressing Tab. You can navigate through the list using the arrow keys or Tab.
If possible, how can I show the completion list in a pop menu ...
0
votes
1
answer
259
views
Bad fish configuration preventing usable login to remote server
I messed up configuring my config.fish, and I now cannot use my server.
Whenever I try to log in, it says
fish: Unknown command '/usr/bin/keychain /home/freebsd/.ssh/id_dsa'
/home/freebsd/.config/...
2
votes
1
answer
684
views
PYTHONPATH Getting set in Bash Shell to incorrect value
OS: macOS Sierra Beta 6
Python: 2.7
Shell: Fish
I am having issues with my PYTHONPATH environmental variable being set correctly.
In my fish_config file, I have this line setting up PYTHONPATH:
set ...
4
votes
1
answer
904
views
In fish shell, which command is equivalent to bash's compgen?
compgen is a useful command, and fish is an excellent command shell. But I cannot find an equivalent in fish.
I write one by myself:
function compgen --description 'Print a list of documented fish ...
21
votes
1
answer
13k
views
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 ...
0
votes
2
answers
84
views
Very weird directory when editing a function in Fish
I am just curious what the meaning is of this bizarre directory from which atom is launched to edit a function from the Fish shell. Anyone have any idea?
4
votes
1
answer
3k
views
How to expand aliases in fish shell?
In bash you can expand an alias you type. For example if I have an alias cmd="cd ~/user", typing in cmd and then hitting Ctrl+Alt+e would change it to cd ~/user. Is there a way to do this with fish?
1
vote
1
answer
552
views
Different options for installing Fish shell on OS X
I want to install Fish on my Mac, and there are three different installation options on the Fish website: there is an installer, installation via Homebrew, and an app.
Which one of these should I ...
0
votes
2
answers
147
views
Unescaped commandline content in fish shell
Is there a way to get the unescaped content of command line in fish? I mean if command line is like ...
$ ls 'foo' "bar"
... the desired output would be ls 'foo' "bar".
The commandline fish command ...
6
votes
2
answers
2k
views
Fish terminal + iTerm, only run shell integration if terminal is iTerm
iTerm has a shell integration script that enables some fancy features, as in having the ability to scroll up to last prompt (in case if there was a lot of stdout i.e. when compiling some code).
...
1
vote
1
answer
829
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 ...
1
vote
2
answers
1k
views
Ctrl-enter for fish shell
I had tried to create some accept completion and execute right away combination in fish on pressing Ctrl+Enter.
function fish_user_key_bindings
bind \c\n accept-autosuggestion execute
end
...
11
votes
7
answers
9k
views
Add abbreviations in fish config
I would like to use the abbreviations feature of the fish shell, especially for the known bash variable !! or aliases to common git commands. I know that abbreviations can be added like in the ...
24
votes
2
answers
17k
views
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)
...
3
votes
1
answer
2k
views
How to chain a group of commands in Fish like { … } Bash?
I'm aware of chain Fish commands via && or || but I'm willing to chain a set of commands
Code
env git clone --depth=1 https://github.com/rafaelrinaldi/theme-pure.git; or {
printf "Error: ...
2
votes
2
answers
1k
views
Using rbenv with the fish shell
When using the recommanded way to setup rbenv, `eval "$(rbenv init -)", I get:
$(...) is not supported. In fish, please use '(rbenv)'.
~/.config/fish/config.fish (line 5): eval "$(rbenv init -)"
...
1
vote
0
answers
160
views
For what purpose is the '&-' file descriptor used in fish?
From the fish manual:
[The File Descripter may be] an ampersand followed by a minus sign
(&-). The file descriptor will be closed
From the Arch wiki:.
Silencing standard output:
$ ...
2
votes
1
answer
739
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 ...
0
votes
1
answer
373
views
Trouble installing fish shell on OS X non-admin user group
I am struggling to install the fish shell on OS X El Capitan.
My user structure is setup so I have an administrator account and a standard account. The standard account is the one that I use and ...
4
votes
3
answers
17k
views
Running the output of `ssh-agent` in fish; what does `setenv` do?
When I want to start (or restart) ssh-agent, it gives me a few commands that I should run by doing eval $(ssh-agent). Of course this fails for fish, since it gives syntax for bash or csh.
The ...
1
vote
0
answers
1k
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
/...
2
votes
1
answer
262
views
How to get fish-style formatting with less
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.
I know ...
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
18
votes
3
answers
11k
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?
2
votes
0
answers
708
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.
...
1
vote
3
answers
332
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
0
answers
231
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 > ...
5
votes
1
answer
8k
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@ ~ %, ...
2
votes
2
answers
634
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
1
answer
399
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 ...
11
votes
3
answers
10k
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 ...
1
vote
2
answers
2k
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 to ...
1
vote
1
answer
431
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 ...
1
vote
1
answer
253
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 ...
2
votes
1
answer
1k
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 ...
1
vote
1
answer
583
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 ...
1
vote
1
answer
3k
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 ...
21
votes
2
answers
19k
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 ...
2
votes
1
answer
595
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 ...
0
votes
1
answer
272
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 ...
1
vote
1
answer
645
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 ...
43
votes
6
answers
27k
views
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-...
2
votes
0
answers
1k
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 ...
5
votes
2
answers
6k
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 ...