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

learn more… | top users | synonyms

2
votes
1answer
56 views

How can I check if a shell is login/interactive/batch in fish?

I want to be able to check if a fish shell is being run in login, interactive, or batch mode, and this question only discusses bash.
0
votes
2answers
29 views

Why does the command not exit smoothly?

Following on from my previous question I tried to run ls -l; and grep html; which did what I wanted however the command didn't exit back to the prompt. Instead it appeared to be waiting for something ...
3
votes
1answer
31 views

Why does this fish script does not run from a launcher?

I've written the following script, intended to start a daemon and display a Zenity window, then stop the daemon when the window is closed: #!/usr/bin/fish if not ps aux | grep [s]erviio > ...
1
vote
0answers
31 views

Is there a way to determine from bash what is wrong with fish?

Just installed oh-my-fish and start modifying oh-my-fish default theme under another name and broke something. Now after login the cursor just blinks and I can write but nothing is interpreted as ...
3
votes
1answer
34 views

How to stop fish shell from underlining path?

The fish shell will underline a path given as an argument to a command such as ls. Is there a way to change that behavior since I find it very ugly? For example:
-1
votes
2answers
21 views

How to set 256colors in xfce4-terminal 0.6.3 that is using the fish shell, always for all users

How to set 256colors in xfce4-terminal 0.6.3 that is using the fish shell, always for all users ? Can't find this info anywhere and it's getting hard.
0
votes
1answer
13 views

How can I mix variables and wildcards in fish?

I have a value stored in a variable that I want to use as part of a wildcard, like this: set extension (somecommand) cp *$extension ~/filezone But the * prevents the variable from being ...
1
vote
1answer
63 views

Execute bash command inside fish function

I decided to try fish shell, and I'm having trouble with some aliases. So I guess the painless way of doing the things would be executing the bash commands inside fish shell functions. Something like ...
1
vote
1answer
54 views

Scripting SSH function getting `Connection refused` error

I am using fish as shell, ssh shortcut function as following: function sshec2 ssh -i $HOME/.ssh/key.pem -t -t "ubuntu@$argv[1]" end To ssh into specific AWS EC2 instance, I wrote command pipe ...
-1
votes
1answer
48 views

Can't set my shell as fish shell due to error when using chsh due to lock file [closed]

My problem: I cannot set my default shell for user 'student' on CentOS 7 to fish-shell. I installed fish-shell by downloading the .gz, configuring, make, make install. output of which fish ...
13
votes
1answer
507 views

Run a command only if the previous command was successful in Fish (like && in bash)

Using Bash I've often done things like cd /study && ls -la I understand that the double ampersand is telling the terminal don't execute part two of this command unless part one completes ...
0
votes
1answer
39 views

problem in login with default /bin/fish shell in gdm

I set my user default shell to fish. /etc/passwd file: mlibre:x:1000:1000::/home/mlibre:/bin/fish and then, in GDM I can't login with my user (mlibre). GDM prints some error. Then, I changed back ...
1
vote
1answer
27 views

Programs don't see fish environment variables

If I set the EDITOR environment variable to emacs in bash, running crontab -e will open the crontab in emacs. When I set it in fish with set -U EDITOR emacs crontab opens with vim. What can I do ...
6
votes
2answers
77 views

xtrace equivalent in the fish shell

Is there an equivalent of POSIX shells' set -x or set -o xtrace that cause the shell to display the commands being run in the fish shell?
2
votes
1answer
91 views

Fish shell slow to respond when command does not exist

When I write a command that does not exist in the fish shell (let's say l instead of ls), fish takes some time before responding that the command does not exist. I don't know if it looks for package ...
2
votes
2answers
130 views

fish: sudo: !!: command not found

I have fish installed in my Linux Mint DE. I really like how fish makes things easier and it looks so pretty although I haven't find a correct answer about why I can't execute: sudo: !!: command not ...
1
vote
2answers
239 views

Fish Shell: How to set multiple environment variables from a file using export

Is it possible to set environment variables with export in Fish Shell? I am working on a project that configures variables this way and it does not make sense to maintain a separate configuration ...
3
votes
3answers
154 views

fish: whitespace in alias

I am trying to alias an executable in a directory with a space in it. For example: alias myfile="/home/ben/test case/myfile" Now, this is not expanded the way I want (it thinks /home/ben/test is ...
3
votes
1answer
312 views

Why does the fish shell need to start a daemon process?

I just started playing with the fish shell, and I really like is so far. However, I can't figure out what the purpose of fishd is. So, why does fish need to start up a daemon process? What is the ...
1
vote
1answer
31 views

fish + script -> chaos, what options?

The fish shell uses many escape sequences as you type, especially if you ever make a mistake or use completion. 'script' just captures them literally, making quite a mess. More of a mess than col -b ...
1
vote
2answers
869 views

How to edit the fish shell startup script?

Is there a way I can do something like run myscript.sh in fish ? I am using Arch Linux, and have installed the fish shell together with oh-my-fish Can someone tell me which file I must edit to add ...
3
votes
1answer
81 views

Can't seem to set environmental variables in fish correctly?

this is my fish configuration: set -x CGO_CPPFLAGS 'llvm-config --cppflags' set -x CGO_LDFLAGS 'llvm-config --ldflags --libs --system-libs all' set -x CGO_CXXFLAGS '-std=c++11' I've tried running ...
1
vote
0answers
387 views

$PATH variable on Fish Shell OS X

I have somehow screwed up my path variables with Fish shell on OS X. Is this the proper $PATH variable in the config.fish? user@host ~> more ~/.config/fish/config.fish set -g -x PATH ...
2
votes
2answers
228 views

In the Fish shell, how can I join an array with a custom separator?

I have an array whose elements may contain spaces: set ASD "a" "b c" "d" How can I convert this array to a single string of comma-separated values? # what I want: "a,b c,d" So far the closest I ...
1
vote
2answers
80 views

Accessing fish functions from perl

In bash I can do: foo() { echo bar; } export -f foo perl -e 'system "bash -c foo"' I can also access the function definition: perl -e 'print "foo".$ENV{"BASH_FUNC_foo%%"}' How do I do the same ...
5
votes
2answers
334 views

Is it possible to exec some commands in a subshell without immediately exiting afterwards?

I use the fish shell and would like to be able to "source" some shell scripts written with sh-compatible syntax, which fish cannot read. For example lots of software expects you to source some shell ...
2
votes
1answer
121 views

What's the easiest way to detect what signals are being sent to a process?

I'm trying to debug an issue with my shell (specifically, fish) sending signals to my background processes. I'd like to be able to recognize what signals a process is receiving. Ideally, I'd like ...
1
vote
0answers
72 views

need help with vf project in fish shell

Hi I am using virtual fish on fish shell, so while trying to do vf project projectName it throws the below error: vf project pytube fish: Unknown command 'virtualenv' ...
2
votes
0answers
204 views

launching fish shell to new terminal of tcsh on centos

I have downloaded fish shell on my centos, but when I switch command to /bin/fish or even try to run xterm -e /bin/fish I am getting following error: Standard input: echo $_ " "; __fish_pwd ...
2
votes
2answers
168 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
2answers
275 views

Why doesn't set -x work within eval within a function in fish?

I ran into an issue trying to dynamically set some variables based on output of a program, in a fish function. I narrowed my issues down to a MWE: function example eval (echo 'set -x FOO 1;') ...
2
votes
0answers
336 views

Unable to create a configuration directory for [FishShell] Please set the $XDG_CONFIG_HOME variable

I'm getting this error when starting fishshell: melanie:~ melanie$ fish fish: Unable to create a configuration directory for fish. Your personal settings will not be saved. Please set the ...
8
votes
3answers
1k views

Share environment variables between bash and fish

bash and fish scripts are not compatible, but I would like to have a file that defines some some environment variables to be initialized by both bash and fish. My proposed solution is defining a ...
26
votes
8answers
2k views

Dealing with file names with special first characters (ex. ♫)

I have recently come across a file whose name begins with the character '♫'. I wanted to copy this file, feed it into ffmpeg, and reference it in various other ways in the terminal. I usually ...
1
vote
1answer
233 views

Can I use modulecmd with fish shell?

At work we use the Environment Modules package (and hence modulecmd) extensively. man module includes the sentence “The sh, csh, tcsh, bash, ksh, and zsh shells are supported by modulecmd.” This is ...
1
vote
2answers
127 views

Bash to Fish Conversion: Display custom message when CD'ing into a specific directory

Basically, I'd like to create a file .cd-reminder with an announcement/message inside a specific directory. It will be displayed every time someone 'cd' into that specific directory. There is a shell ...
5
votes
1answer
107 views

sudo and fish: no credential caching

I use fish as my standard shell. And I use sudo sometimes. But I'm having problems with credential caching. On an Ubuntu system, this works: niklas@Niklas-Mobil~> sudo true [sudo] password for ...
1
vote
2answers
169 views

Start several fish shells in different directories?

In order to be able to launch my work environment with a single command, I want to start several urxvt windows running fish shell in different folders. However, I found no obvious way of having fish ...
3
votes
2answers
263 views

how to set and use multiple parameters in single environmental variable in fish shell

I want to use following in fish shell: $ export arm='ARCH=arm CROSS_COMPILE=arm-eabi-' $ make $arm This works fine in bash/zsh but not on fish shell. But if I execute the following in fish shell: ...
2
votes
2answers
868 views

Queue a task in a running shell

I often start a long running command that is bound to either CPU, Disk, RAM or Internet connection. While that is running, I find that I want to run a similar command. Let's say downloading something ...
3
votes
1answer
199 views

Conditionals for fish shell

I am going through the fish shell tutorial and find that this simple if-else block does not work if grep fish /etc/shells echo Found fish else if grep bash /etc/shells echo ...
1
vote
1answer
563 views

How to use booleans in fish shell?

I switched to fish shell and quite happy with it. I didn't get how can I handle booleans. I managed to write config.fish that executes tmux on ssh (see: How can I start tmux automatically in fish ...
1
vote
1answer
1k views

How can I start tmux automatically in fish shell while connecting to remote server via ssh

I switched from bash to fish shell. I liked it and decided to use it on my servers also. How can I start tmux automatically on ssh connection? I followed this instruction for bash but fish shell is ...
5
votes
1answer
190 views

Is there a command to move a file, and symlink it back to where it was?

I often find myself wanting to move a file, then create a symlink where it was. In doing this by hand I tend to twist my mind. (Esp after doing half a dozen files) Use cases: Moving all my "dot ...
3
votes
1answer
230 views

Show completions under the prompt in Fish

Is there a way I can get the ultra compact auto-complete function from Zsh in Fish, so If I press Tab it won't write me all the possibilities permanently into my terminal but underneath the prompt?
4
votes
1answer
2k views

Converting bash script to fish

I'm trying to add the following bash scripts to fish, yet am having trouble getting the syntax in fish right. Here is the original script: export MINION_INSTALL=$HOME/minion export ...
1
vote
1answer
436 views

Adding pass completion to fish shell

I'm trying to get the CLI password manager pass to work in my fish shell with auto completion. I've already found the necessary file, yet am having trouble finding out where to put it, or rather ...
24
votes
1answer
2k views

Does Bash have similar features such as Fish's autosuggestions and highlighting?

I recently noticed 2 features in Fish and was wondering if anyone knew if these were also available in Bash? Syntax highlighting Specifics: You'll quickly notice that fish performs syntax ...
3
votes
3answers
2k views

How do I create a GUI application launcher for xfce4-terminal with fish but inheriting the environment variables from bash?

If I run fish from a bash prompt, it will inherit the environment variables I have set in my .bashrc and .profile files, including the important $PATH variable. So far so good. Now, I want ...
3
votes
1answer
744 views

Is it possible to have comments in multiline commands in fish?

In bash it's possible to do my_function() { echo "hello" | #remove 'l' tr -d 'l' } but in fish ( http://fishshell.com ) I wasn't able to do the same: function my_function echo "hello" | ...