Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [fish]

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

0
votes
0answers
18 views

byobu-launcher-install ignoring no-logout option

My Current config : MacOS High Sierra, Terminal.app, fish shell. byobu-launcher-install -n Issue: When I try to detach from byobu using 'ctrl-a, d' byobu detaches and fish shell session exits along ...
1
vote
1answer
95 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/...
0
votes
1answer
52 views

Difference between set -g and set -x

I'm currently migrating from bash configs over to fish and got stuck translating my over bash exports. It seems there's three ways to do it in Fish that get the job done but I can't tell which one I ...
1
vote
0answers
34 views

fish shell, enter long command

Given the usual size of the terminal window, short commands fit. Ex: stoqlt@desktop:~ > ls files However, typing a command that is longer than the free space after the prompt, and reaching the end ...
3
votes
1answer
131 views

Why it is not recommend to set default shell for root uset 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 kernel or other things in the system have a relation ...
1
vote
1answer
34 views

Issue with wrong command entered in fish-shell and it's output

Actually I am using fish these days and I completely switched from bash to fish (with chsh & terminal startup command) but the matter is when I enter a wrong command e.g. qwerty its output is: ...
0
votes
1answer
67 views

How to start a fish instance with a specific `config.fish`?

I want to start a particular fish instance with a specific config.fish. Something along the lines of the Bash --rcfile option. I'm aware of the XDG_CONFIG_HOME variable. But I just want to switch ...
3
votes
1answer
48 views

In fish shell, how to select with the cursor while shift is held?

In all gui text editing, ctrl-arrow moves the cursor by word, and holding shift selects as the cursor moves. Thus ctrl-shift-left selects the previous word. Fish already has the former but I want to ...
0
votes
1answer
92 views

Fish shell doesn't return program error

In bash, if I run a program and it crashes I get some information about what went wrong, such as Segmentation fault (core dumped). In fish, I just get fish: but no message... does anyone know what the ...
4
votes
2answers
575 views

What's causing the file is not executable by user on the windows subsystem for linux?

This seems to have randomly started a few days ago. It used to be fine to run fish shell from Ubuntu bash for Windows. But suddenly when I hit Tab for autocomplete, it barfs with: The file "x86" is ...
1
vote
1answer
55 views

Two questions about adding custom content to config.fish

I have a question about the Fish (Friendly Interactive SHell), so I hope somebody can help me out. Basically I'd like to customize the fish_greeting message. I can easily get it to say anything I'd ...
0
votes
0answers
100 views

Fish shell not using variable scoped with Direnv within Git aliases

I am using Fish shell [1] and Direnv [2], and are having issues with variable scope when using Git aliases. For example in my config.fish [3] I have a global environment variable e.g. $GIT_MY_EMAIL: ...
6
votes
1answer
564 views

Where does fish_config save its settings?

I've used the fish_config utility to customize my syntax color scheme and now I want to copy these settings to remote servers I can't run fish_config on. Where does it save the changes made through ...
2
votes
2answers
965 views

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

Change the color of the omitted newline char in fish shell

Is there any way to change the color of the "⏎" sign after output of echo -n a (or any command which doesn't have \n at the end of the result)? It's unreadable if using black background. There is an ...
0
votes
1answer
85 views

Error on iTerm2 fish shell load: `function: Illegal function name '-v'`

On iTerm2 load: Last login: ... on ... function: Illegal function name '-v' ~/.iterm2_shell_integration.fish (line 86): function -v _ underscore_change if [ x$_ = xfish ] ...
1
vote
1answer
134 views

What, if any, is the equivalent of bash's select…in…do..done in fish?

I had finessed in bash a function that changes to any directory below the current working directory by having that directory name as a parameter to the function. If there are multiple results by that ...
1
vote
0answers
138 views

Why does fish shell create a hidden process in iTerm2

I've moved from bash to fish shell in iTerm2. However, whenever I start iTerm2, I receive the following error message: A session ended very soon after starting. Check that the command in profile ...
2
votes
1answer
259 views

Using Fish + NVM + Sublime results in commands not found

I'm using Fish shell/omf, NVM (https://github.com/derekstavis/plugin-nvm), and Sublime Text 3. I'm trying to use a build system to run nodemon (which I installed with npm -g install nodemon). nodemon ...
1
vote
1answer
939 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
1answer
165 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 ...
-1
votes
1answer
310 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
1answer
302 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, ...
3
votes
2answers
52 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 ...
3
votes
1answer
3k 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 ...
0
votes
1answer
426 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
1answer
112 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
1answer
420 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 ...
1
vote
0answers
192 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 ...
5
votes
1answer
4k 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
2answers
46 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?
2
votes
1answer
627 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
1answer
186 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
2answers
78 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 ...
4
votes
1answer
1k 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). ...
0
votes
1answer
349 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
2answers
388 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 ...
6
votes
4answers
2k 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 ...
23
votes
2answers
16k 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) ...
2
votes
1answer
557 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: ...
1
vote
1answer
180 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
0answers
90 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
1answer
286 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
1answer
213 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 ...
1
vote
2answers
15k 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 ...
0
votes
0answers
575 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
1answer
109 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
3answers
121 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
13
votes
3answers
4k 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
262 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. ...