Skip to main content

Questions tagged [fish]

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

Filter by
Sorted by
Tagged with
277 votes
13 answers

Execute a command once per line of piped input?

I want to run a java command once for every match of ls | grep pattern -. In this case, I think I could do find pattern -exec java MyProg '{}' \; but I'm curious about the general case - is there an ...
Xodarap's user avatar
  • 3,693
63 votes
3 answers

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 ...
slm's user avatar
  • 372k
51 votes
3 answers

How to make zsh completion show the first guess on the same line (like fish's)?

In Fish when you start typing, autocompletion automatically shows the first autocompleted guess on the line itself. In zsh you have to hit tab, and it shows the autocompletion below. Is there anyway ...
korylprince's user avatar
  • 1,841
26 votes
7 answers

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 ~/....
Tyilo's user avatar
  • 6,031
3 votes
3 answers

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 ...
Martin Ueding's user avatar
2 votes
1 answer

Fish shell shows dark-grey "âŽ" characters in prompt

I'm pretty certain this is some foible of my SSH client (RoyalTS for Windows) but, having just installed and changed to fish shell, my prompt is preceded by two dark-grey ⎠characters. It doesn't ...
jimbobmcgee's user avatar
0 votes
1 answer

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 ...
Jordan Rhea's user avatar
17 votes
1 answer

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 ...
Nathaniel's user avatar
  • 440
11 votes
2 answers

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 ...
Philip Kirkbride's user avatar
9 votes
3 answers

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) ...
suizokukan's user avatar
7 votes
1 answer

Bash's Process Substitution "<(command)" equivalent in fish shell

In bash, I usually do grep -f <(command) ... (I pick grep just for example) to mimic a file input. What is the equivalent in fish shell? I cannot find it in the documentation.
annahri's user avatar
  • 2,075
5 votes
1 answer

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, ...
Nathaniel M. Beaver's user avatar
5 votes
3 answers

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 ...
hugomg's user avatar
  • 5,837
4 votes
3 answers

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 ...
qznc's user avatar
  • 171
4 votes
1 answer

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 that executes tmux on ssh (see: How can I start tmux automatically in fish ...
rominf's user avatar
  • 517
4 votes
3 answers

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 ...
rominf's user avatar
  • 517
3 votes
2 answers

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: ...
user3202436's user avatar
3 votes
2 answers

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 ...
Chris Conover's user avatar
3 votes
1 answer

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 ...
yamatau's user avatar
  • 63
3 votes
1 answer

Terminal fish prompt blank

So I'm trying to change my fish shell terminal prompt but every time I change anything too complicated (beyond colour changes and rearranging the prompt), it just turns up blank. I'm running Arch ...
Abdelsalam ElTamawy's user avatar
1 vote
2 answers

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 ...
Alex Baranowski's user avatar
1 vote
2 answers

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 in ...
Ole Tange's user avatar
  • 35.8k
1 vote
0 answers

Unable to execute bash scripts from within fish-shell

I have a collection of bash scripts that I have added to the PATH so that I can execute them from anywhere. export PATH=$PATH:~/<path>/<to>/<scripts> so along with ./<path>/&...
myTerminal's user avatar
0 votes
3 answers

TMUX and terminal colors are not the same locally and over ssh

I have a bunch of dotfiles that allow me to have a pretty theme on my terminal and tmux on my local host. I use kitty, fish and tmux. To properly define colors and have a global coherence, I use the ...
alpha1554's user avatar
  • 101