Stack Exchange Network

Stack Exchange network consists of 175 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]

Fish is a unix shell with a clean design and a limited but powerful feature set.

3
votes
2answers
209 views

Issue with type force PATH search

This is Bash. The behavior is similar in fish. $ which python /usr/bin/python $ alias py=python $ type py py is aliased to `python' ​And then, running type -P py prints nothing, where as I expected ...
0
votes
2answers
65 views

How to install fish in a remote server I cannot sudo?

I want to install the fish shell in a remote server I have no sudo privileges at, so that I can use it whenever I ssh.
1
vote
1answer
36 views

Does one string contain another in fish shell?

I am working on my fish.config for using the fish shell. I am trying to compare strings using bash syntax but fish doesn't accept the syntax. There is clearly another way to do it. Any suggestions ...
0
votes
0answers
17 views

Inconsistent newlines in fish shell under Lubuntu 18.10

I have recently installed Lubuntu 18.10 and have found the qterminal messes with the behavior of the fish shell. Fish shell adds a newline to the end of commands who's outputs don't already end in ...
4
votes
2answers
216 views

fish shell : exec format error

On an Ubuntu ($ uname -a : Linux kumanaku 4.15.0-43-generic #46-Ubuntu SMP Thu Dec 6 14:45:28 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux), I just installed fish ($ fish --version : fish, version 2.7.1) ...
3
votes
2answers
154 views

How to use fish on remote servers that have it installed without changing login shell?

I regularly ssh on several different servers, some of which don't have fish installed, but many do. I'd like to get fish as shell if available (changing midway is always tedious, and you lose the ...
0
votes
1answer
165 views

Terminal shows non-ascii? characters in UTF-16 hex codes

todoroki@todoroki-VJZ13B ~>printf "ä\n" echo "ä" ä ä ä \udcc3\udca4: \u30b3\u30de\u30f3\u30c9\u304c\u898b\u3064\u304b\u308a\u307e\u305b\u3093 ...
1
vote
4answers
199 views

Define function in fish, use it with watch

I want to define a function, and call that function every n seconds. As an example: function h echo hello end Calling h works: david@f5 ~> h hello But when using watch, it doesn't... watch ...
4
votes
1answer
2k views

Why I can't add fish to /etc/shells?

I'm trying to use fish shell as my default shell on OSX. I have installed fish shell using brew and when I wanted to add it to /etc/shells I got this error: tee: /etc/shells: No such file or ...
3
votes
1answer
56 views

Bash operator translation to fish

I've been trying to learn to use jq and for bash it uses the <<< operator which I cannot understand after reading the bash documentation, what is this operator for? Besides that, I use the ...
0
votes
2answers
1k views

Yum not finding packages from added repo [CentOS 7]

I am currently trying to install fish on a new CentOS 7 machine. Followed the very straightforward guide which was: cd /etc/yum.repos.d/ wget https://download.opensuse.org/repositories/shells:fish:...
1
vote
1answer
231 views

Print and log stdout and stderr in fish shell

I am using the fish shell and try to log stdout and stderr into two separate files and printing them in the terminal at the same time (e.g., by piping each stream to tee). In bash I would do (see ...
0
votes
2answers
138 views

fish-shell: shortcut “ctrl-L”

I´m a keen user of the fish-shell and I like it a lot. One question though: on the page https://fishshell.com/docs/2.1/index.html there is a paragraph entitled "Command line editor". It lists a lot ...
0
votes
0answers
33 views

Time appearing after text in fish prompt

I'm on a mac and I'm using iTerm2, although this still happens in Apple's terminal. This doesn't happen in bash or any other prompt. Changing my fish_prompt doesn't affect this. I have no idea what's ...
0
votes
1answer
52 views

Terminal prompts have a mysterious [I] in it

I have been using fish shell for a while, but only recently got into playing around with the oh-my-fish framework and theming the prompt. I cannot figure out what this [I] character means! In most ...
1
vote
0answers
85 views

Group membership disappears with tmux

I have a weird problem in that my user (on Linux Mint 18.3 Sylvia) is part of group docker, which I verify by starting a terminal: $ groups me adm cdrom sudo dip plugdev lpadmin sambashare docker ...
0
votes
2answers
391 views

Temporarily Set $PATH for a fish Shell Session From a Script

I want to prepend a couple directories to the $PATH variable temporarily so that I can set up a temporary development environment that I don't really want to change what other fish sessions see. So ...
2
votes
2answers
746 views

How to access bash aliases in fish

I am missing my bash aliases in fish, and don't want to manually convert all of them to fish functions. How to get access to them all from within fish? Bonus points if: the solution supports an ...
1
vote
2answers
100 views

Processing local variable with regular expressions

I have some video files in source/ to encode and I want the output to be saved in the local directory, therefore removing source/ in the filename. I accomplished this by using the following command ...
3
votes
2answers
329 views

How to group multiple conditions in an if statement in fish

As is, the code below is invalid, because the brackets can not be used like that. if we remove them, it runs fine, and outputs: true true code: #!/usr/bin/fish if ( false ; and true ) ; or true ...
3
votes
3answers
834 views

shell command `tmux` throws `can't use /dev/tty` error

I just switched from using terminator to termite today. I also Installed Fish and oh my fish, Spent a couple hours configuring everything, but when I went to start a tmux session to get some work ...
2
votes
1answer
656 views

Is $argv in fish shell different from $@ in bash?

I was trying to learn and write some fish scripts, but I encountered a strange issue. # a.fish # this is a fish script set temp (getopt -o abc -l ace,bad,correct -- $argv) echo $temp When I ran ...
14
votes
2answers
921 views

Why can't I list a directory with read permissions?

I created a directory d and a file f inside it. I then gave myself only read permissions on that directory. I understand this should mean I can list the files (e.g. here), but I can't. will@wrmpb /p/...
0
votes
1answer
1k views

Using ~/.dircolors in fish shell

I just recently switched to the fish shell from bash and I am having trouble sourcing my dircolors template file to get custom colors to appear for certain file extensions. In bash, I was sourcing a ...
7
votes
1answer
2k views

How to change the default shell in NixOS?

At the moment I need to set the fish shell to be my default shell on NixOS and there is no official documentation on how to do that declaratively (not by running chsh) in NixOS.
1
vote
2answers
424 views

Capture stdout and stderr as separate variables in fish shell

Is this even possible? I'd like to run a command but capture its stdout and stderr as separate variables. Currently I'm using set -l var (cmd), which leaves stderr untouched. I can do set -l var (cmd ...
2
votes
1answer
217 views

How can one override bash Ctrl+C to be more fish-like

I find myself using bash more often than not on remote machines even though fish is my preferred shell. Fish has small, but nice feature that when you hit Ctrl+C something like this happens: if ...
1
vote
2answers
582 views

debian 9 terminal cannot change to su

I installed debian stretch yesterday. I installed fish shell . I change the default shell to fish by the following su chsh -s 'which fish' Then again enter the this command su chsh -s `which fish` ...
1
vote
0answers
432 views

How can I send stdout to multiple commands in fish shell?

Same question as How can I send stdout to multiple commands? but for fish shell.
3
votes
2answers
1k views

Start bash then autostart fish with terminator

I've been using terminator, and recently started using fish. When terminator starts (bash) I can use, for example, node just fine. If I then start fish I can still run node just fine. I set ...
3
votes
1answer
263 views

Issues with scp if I use bashrc to open fish if present

Situation: Need to login to multiple remote servers with some of them having fish shell Requirement: Default shell is bash. If I login to a server and fish is present, switch to fish shell, otherwise ...
4
votes
1answer
2k views

How does history work in fish shell?

I'm a bash user, starting a new job at a place where people use fish shell. I'm looking at the history command which I often use in bash. When I use it in fish I get a long list of my history which ...
1
vote
1answer
237 views

Remap Ctrl+E to autocomplete file names in fish

I'm using Fish shell on Urxvt terminal. I want to map Ctrl+E as auto-completion key, what is done by pressing Right arrow key by default. I'm not sure if it's shell's or terminal's feature to do so, ...
-1
votes
1answer
66 views

Fish Shell - function name conflicts with apt package in Ubuntu [closed]

I have created a fish function named proot but there is an Ubuntu package with the same name. When I type 'proot' into my fish shell, I get ~> proot The program 'proot' is currently not ...
1
vote
2answers
872 views

Ctrl Right and Ctrl Left doesn't move from a word to another in Fish Shell

When I use on Linux Mint my Fish Shell, using the Ctrl-← or Ctrl-→ keys isn't moving the cursor to the previous or next word. It switches between an I and an N instead: I cannot do ...
1
vote
1answer
301 views

Looking for fish theme with powerline, full path and return and carriage return after the prompt line

I'm looking for a theme I noticed some time ago and that I can't find again, it was a theme on fish or zsh where the prompt line (user & path) had powerline theme, the full path was displayed and ...
2
votes
0answers
154 views

History expansion in fish

I want to run the previous command with part of it replaced. In bash, I can use the history expansion feature: ^x^y runs the previous command again, except with x replaced by y. I tried it in fish and ...
2
votes
0answers
89 views

Printing autocomplete info on current option in fish shell

When writing a command with a - option and pressing tab, a list of possible completions with short explanations of what the options do is displayed. Is there a way to make this list also contain the ...
1
vote
1answer
213 views

How to unmap keys in fish?

I want to unmap (unbind) certain keys such as Up, Down, Left, Right, Page Up, Page Down, Home, End specifically in the fish shell. I guess I have to use the bind command in the .config/fish/fish....
2
votes
2answers
159 views

Quoting and concatenating a fish function argument

I keep destroying and provisioning VMs, so ssh frequently complains that I'm being NASTY. Mmmm... Anyways, I wrote a fish function to banish the offending key on the line it tells me with sed: ...
0
votes
1answer
364 views

check a range with switch/case in fish shell

Is something like this possible with fish? i.e. switch $var case a-z do something case "*" do something else end case "*"works fine, but case a-zdoesn't trigger. I also tried case [ a-z ...
2
votes
3answers
941 views

Windows bash takes arrows as symbols via ssh and fish shell on server

I have a bit complicated question. I am using Windows 10 Anniversary Update with Bash for Ubuntu. I am connecting to server via ssh. This server uses fish shell. And when I press arrows it just prints ...
4
votes
1answer
374 views

Fish shell testing for existence of file in $PATH

I'm trying to test in a fish shell script for the existence of the figlet binary. Since I use Linux and OS X I cannot rely on the file being in the same location and need to resolve it dynamically. I'...
1
vote
1answer
351 views

Output pipe waits for EOF in fish [closed]

I'd like to take the csearch output and color it. It looks like so: /home/bp/whatever.txt:1:foo And this works: csearch -n -- $term \ | env GREP_COLORS='mt=02;35' grep --color=always -P '^[^:]+:[^...
1
vote
0answers
82 views

Internal path not set in GVim when launched from gvim.desktop

shell: bash, fish terminal: xfce4-terminal other-applications: xfce4-whiskermenu, tmux I'm trying to have GVim inherit the full path from bash and/or fish when launching from from xfce-whisker-menu....
0
votes
2answers
153 views

Why 'kill -l' gives different output in fish and bash

I was using fish-shell when reading about kill command. The output of kill -l command for fish is HUP INT QUIT ILL TRAP ABRT IOT BUS FPE KILL USR1 SEGV USR2 PIPE ALRM .... When invoking same command ...
6
votes
3answers
1k views

find -exec not working in fish

While using fish as my shell, i'm trying to set permissions on a bunch of c source files in current dir with find . -type f -name "*.c" -exec chmod 644 {} +; I get an error find: missing ...
3
votes
3answers
727 views

Gnome-terminal custom command and dynamic working directory

This is kind of a followup to another question. I use a custom command in my gnome-terminal profile (/usr/bin/fish). When using Ubuntu 14.04 a Ctrl-Shift-N opened a new gnome-terminal window in the ...
5
votes
1answer
253 views

Shell that tab-completes prefix?

I would like tab completion to behave differently when the cursor is at the beginning of a word than when the cursor is at the end of a word. I've only ever seen shells that tab-complete the suffix, ...
1
vote
1answer
657 views

Can I open terminator with one windows with bash and another with fish? [duplicate]

So I am running terminator 0.98. I like fish shell but for some task it is handy to have bash (like for virtualenvwrapper). So I now have two windows that open when I start terminator. But I would ...