2022 Developer Survey is open! Take survey.

Questions tagged [fish]

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

Filter by
Sorted by
Tagged with
-1 votes
1 answer
26 views

How do I launch the fish shell in WSL through Cmder?

Setting it as the default shell in Ubuntu WSL results in the PATH not working properly, as described in the docs. So I want to avoid that issue by launching it through the terminal.
user avatar
0 votes
1 answer
26 views

FISH - How to hide hostname/computer from prompt?

For context, I am using FISH 3.1.0. I looked in fish_config, but none of the prompt options just remove the hostname/computer while keeping the rest the same. Is there a way to keep most of the ...
user avatar
0 votes
1 answer
25 views

How to open new terminal window in previous directory using fish shell?

I use fish shell and Gnome-Terminal Version 3.44. When I open a new terminal I'd like it to start up in the previously-visited directory. How can I implement this via fish shell?
user avatar
2 votes
1 answer
35 views

I deleted fish shell and now VS Code terminal doesn't work

I have been working on a tutorial in Angular. Everything was working fine before I went to work today. I came back to my home computer after work today and the fish shell I was using within VS code ...
user avatar
  • 41
1 vote
1 answer
50 views

tmux changes shell prompt

Ubuntu 20.04 (running inside VirtualBox, if that's important.) tmux 3.0a (installed via apt) fish 3.4 (and earlier 3.3) starship.rs 1.1.1 Font: FiraCode Mono I have configured my prompt to look as ...
user avatar
  • 113
0 votes
1 answer
64 views

iTerm2 clear screen should not delete output of running command

When I used command + k the output of the actual running command was not cleared. Now with my new MacBook I don't know how to set this feature again. Has anyone an idea?
user avatar
  • 101
2 votes
1 answer
89 views

Is it possible to set separate fish color configurations for light and dark system theme?

I use a terminal (Iterm2 Beta) that allows you to set a separate theme for light and dark mode. This is useful for changing the background color of the terminal, and the contrast of the various preset ...
user avatar
  • 121
2 votes
2 answers
222 views

Accidentally deleted fish while it was being set as my shell - what can I do?

I'm on macOS and I accidentally removed /usr/local/bin/fish while fish was being set as my shell. Now when I try to start my terminal I get: login: /usr/local/bin/fish: No such file or directory What ...
user avatar
3 votes
3 answers
73 views

How do I add a keymap into fish vi keybindings?

I've just started using fish and I'm loving using the vi keybindings it provides. I wanted though to add a custom keymap that I use in vi. I usually map space+c in visual mode to yank to "* (...
user avatar
  • 133
1 vote
1 answer
94 views

How to remove leading file path information from fish shell tab-complete suggestions?

Using fish, typing ls <tab> in an example directory, the terminal displays: $ ls bar/ dir/ foo/ Continuing with d<tab><tab> this becomes: $ ls dir/ dir/moredir/ dir/otherdir/ ...
user avatar
  • 13
0 votes
0 answers
59 views

Retrieve current folder on custom command on gnome-terminal

I'm using fish for some days upon Ubuntu gnome but I don't know if that's possible to keep the feature "open the terminal in a specific folder". Inside Files app, I right click inside a ...
user avatar
  • 101
0 votes
1 answer
145 views

Tools and utilities don't work when fish is made default shell

WSL2 running Ubuntu 20.04 | fish 3.3.1 (installed via PPA) When I try to invoke tools like poetry and rustup (which were installed when I was using bash) in a temporary fish session (by running fish ...
user avatar
1 vote
1 answer
185 views

How to use jenv with Fish shell on Linux?

I downloaded jenv using the official instructions, added it to the PATH and then tried to init it, using the command given in the instructions, but it throws the following error: > source (jenv ...
user avatar
1 vote
0 answers
23 views

Is there a way to search token history rather than entire commands

The default fish or fzf implementations for ctrl-R is very helpful for looking through and replacing the prompt buffer with lines in history. Is there something similar to alt-up/down, history-token-...
user avatar
  • 2,605
0 votes
2 answers
182 views

Fish shell: Set variable outside of current shell

I would like to create the variable $EIGENto save the path where I installed the Eigen library in order to link in with my compiler. For this I was using set EIGEN path/to/eigen However if I echo $...
user avatar
1 vote
1 answer
62 views

Function does not autoload in Fish shell

I have a fish function in a file called mvnw.fish in /Users/myUser/.config/fish/functions The /Users/myUser/.config/fish/functions directory does appear (in first position, not that it matters) in $...
user avatar
  • 175
1 vote
1 answer
1k views

Alacritty cursor always block (█)

I reinstalled Ubuntu (LTS) yesterday and now my cursor in Alacritty is always a block (█). It works fine in Neovim but whatever I do it stays the same in my normal shell. I tried it in fish, bash, sh, ...
user avatar
  • 11
1 vote
1 answer
100 views

What is the cause of this seemingly random error that occurs when I start the fish shell?

I'm sorry that I'm asking a question like this here, but I have absolutely no idea what is causing it, and I can't seem to find any information anywhere else. Whenever I launch fish on my computer (...
user avatar
0 votes
0 answers
52 views

Fish shell alternates between prepending ~ and > depending on which directory I am in

I'm new to using the Fish shell; however, I'm observing some strange behaviour when I navigate between directories. Below is the output of my shell. Initially, all commands are prepended with ~; ...
user avatar
  • 127
0 votes
1 answer
56 views

Is it possible to have an abbreviation in a shell anywhere in a command?

I have a directory which has a really long path. However, I use this directory constantly and I cannot move it (WSL Windows directory). I generally use z to jump around to it quickly which is useful, ...
user avatar
  • 23
1 vote
1 answer
33 views

distinguish C-i from Tab in Fish?

My fish configuration contains following bindings: bind \ci nextd-or-forward-word bind \co prevd-or-backward-word bind \t complete When I comment out complete then directory navigation to works as ...
user avatar
1 vote
1 answer
148 views

fish shell outputs ⏎ (i.e. an "abandon line") during startup on smaller terminal sizes

Whenever I open a new terminal window (that's <100 columns wide) Fish prompts me with: ⏎ foo@bar ~> I'm not expecting that first line with ⏎ to appear! If it's 100 columns or wider, then this ...
user avatar
  • 253
0 votes
1 answer
105 views

How do i pass function parameter as string in fish shell

Octave has an --eval option that takes a sting like "sqrt(4)" and outputs "ans = 2". I want to create a function that passes the a parameter as string so i can call it like this: ...
user avatar
1 vote
2 answers
68 views

Why fish shell does not allow function named `-`

I am trying to use fish as my default interactive shell. I was previously using bash and there was support for alias named - (ASCII hyphen, 0x2d). Why does not fish allow creation of alias or function ...
user avatar
  • 219
1 vote
1 answer
165 views

How to I persist prepended items to PATH in fish shell?

My PATH Prefixes Don't Persist I'm using Fish v3.2.0. According to the documentation, set -U fish_user_paths should persistently ensure that the directories stored in it should be looked up before ...
user avatar
  • 1,991
1 vote
1 answer
163 views

Run the current command and pipe the output to fzf

What would be an easy way to bind a key binding from fish to run the current command prompt and pipe it to fzf for easy search/selection? i.e. a 1 key-press way of accomplishing | fzf (enter)?
user avatar
  • 2,605
3 votes
2 answers
257 views

How can I ask `fish` to enumerate all the locations it's reading configuration from?

When I start fish, I'd like it to print every location it's reading configuration, profiles, and customizations from, so that I can: understand which specific paths I need to backup if I want to ...
user avatar
3 votes
1 answer
180 views

Is there a fish way of doing zsh's noglob builtin?

From https://linux.die.net/man/1/zshmisc : noglob Filename generation (globbing) is not performed on any of the words. zsh example: $ ls /* <lots of output> $ noglob ls /* ls: cannot access '/...
user avatar
  • 1,116
5 votes
2 answers
667 views

Where is the best place to add an “ssh-add” command in fish shell startup?

At some point I added an ssh-add invocation to my config.fish file. So every time I open a terminal, that runs for a couple of seconds. Is there a better place to set this, so that it runs upon login? ...
user avatar
  • 191
0 votes
0 answers
1k views

MobaXTerm “Follow Terminal Folder” STFP & Fish Shell

MobaXterm's "Follow Terminal Folder"/"Follow SSH Path" feature works great when remote SSH into a linux computer, it shows directory & files to the left as you work in the ...
user avatar
  • 1
1 vote
1 answer
417 views

Minimal Backup of Fish Shell Config

Thanks to the influence of many, including one who has a passing association to a certain green tinged distro I have moved over to fish (from zsh). However config is quite different and I couldn't ...
user avatar
2 votes
2 answers
498 views

Execute two or more commands simultaneously in shell script

It is often very helpful to run commands in parallel in a shell script, but I cannot find ways to do it. Is this possible? If so, how would I achieve that? I'm mainly interested in doing that for fish....
user avatar
  • 165
1 vote
1 answer
113 views

Change the startup directory to something other than HOME

By default, when I open the fish shell, my working directory is the home directory. Is there a way to change the default working directory on startup, without having to edit the HOME variable?
user avatar
1 vote
1 answer
177 views

How can I change the prompt to always show the current path?

I want to continue using the fish shell with as little changes to default setup as possible. But there is one thing that really bugs me. When the terminal window is cramped the prompt just becomes >...
user avatar
1 vote
1 answer
499 views

tmux run a pipe/chain of commands with keybinding

How can I run a chain of command like in shells with tmux? I want to run multiple commands based on success of them. I want to echo out to terminal (or command bar) E.g. I have a keybinding to reload ...
user avatar
  • 140
3 votes
1 answer
784 views

/bin/bash shell (macOS) throwing `-bash: declare: -A: invalid option` error message at shell start

I briefly changed my default shell on macOS Catalina (10.15.1) to Fish, following the steps in Fish's documentation. First, I executed > echo /usr/local/bin/fish | sudo tee -a /etc/shells followed ...
user avatar
2 votes
1 answer
387 views

Is there a Fish equivalent to "bash --rcfile ~/.bashrc"

I've just moved over to fish shell after years of Bash. I've ported all of my functions over pretty easily except for a very simple one I have called mkroot: mkroot () { sudo bash --rcfile ~/...
user avatar
1 vote
1 answer
610 views

how to enable command line navigation shortcuts in fish shell running in iTerm on Mac

Setup: MacOs Mojave, iTerm, Fish shell 3.0.2, using fisher have theme bob-the-fish installed as well. Would like to be able to use command line navigation keyboard shortcuts such as ctrl-A to get t ...
user avatar
  • 121
2 votes
1 answer
3k views

tmux.conf is giving syntax error

My .tmux.conf is # https://github.com/seebi/tmux-colors-solarized/blob/master/tmuxcolors-256.conf set-option -g status-style bg=colour235,fg=colour136,default # bg=base02, fg=yellow # set window ...
user avatar
1 vote
1 answer
51 views

Fish: Concise way to output elements of list on separate lines

I am wondering if there is a concise way to output the elements of a fish list on separate lines. I know I can do e.g. echo $PATH | tr ' ' '\n' to achieve the desired output, e.g.: /usr/local/sbin /...
user avatar
  • 178
1 vote
1 answer
98 views

Redirect Streams

I am trying to redirect the results of rg to comm to compare the match intersection. Fish seems to think that I will be passing a file path and and not the stream. > comm -12 <(rg -l "\\bar\\b" ...
user avatar
6 votes
1 answer
725 views

What's the easiest way to prepend the current time to the fish prompt?

I'd like to see the current time in my fish prompt so that I can always see for example when I started the last command. I don't want to install extensions.
user avatar
  • 299
1 vote
0 answers
60 views

fish prompt returns to defaults after change in fish_config

I've been using Fish for a while and after installing Oh-My-Fish the prompt changed to the default OMF prompt. And I couldn't change to what I was using before, one of the default Fish prompts called "...
user avatar
  • 11
0 votes
1 answer
174 views

Why might I not see stty key changes reflected in "stty -a"

I'm trying to change some key bindings in my console (Konsole). If I map intr to Ctrl-k, by running stty intr \^k I don't see the change reflected in stty -a speed 38400 baud; rows 46; columns 172;...
user avatar
  • 608
0 votes
1 answer
470 views

How to copy fish config files to remote computer?

I am looking for instructions or a script to copy my fish config files to a new computer via scp. Or at least build a tar file with all of them.
user avatar
  • 101
4 votes
1 answer
382 views

Fish Shell - can't find where "la" is defined as "ls -la"

On both my Mac and Ubuntu when I type "la" in Fish Shell I receive output identical to that from "ls -la". I thought I might have defined it as a function. However, I can not find "la" being defined ...
user avatar
  • 43
3 votes
1 answer
7k views

Installing Homebrew with fish-shell

I recently had a mishap with MySQL and when I uninstalled it from System Preferences it uninstalled Homebrew as well (I checked the erase all files that are related to MySQL, which was probably not ...
user avatar
1 vote
1 answer
91 views

vim displays rbg codes in quickfix bar before error output

Recently I've started using :make and various other commands that make use of the quickfix bar. However the output it produces has this initial line of an escape character and rgb codes. I was able ...
user avatar
0 votes
0 answers
114 views

Can't find command after setting PATH in fish

I'm struggling to add /usr/local/bin to my PATH so I can use geckodriver, which is located in /usr/local/bin/geckodriver. I tried the to add the following to my config.fish set -U fish_user_paths /...
user avatar
3 votes
2 answers
879 views

No colors in weechat, tig, htop, ranger, etc

I noticed that on my Mac I don't have any colors in e.g., tig, weechat, htop or ranger. On my linux I do. It happens in all terminal apps I have (alacritty, iterm and Terminal.app), in zsh, fish and ...
user avatar
  • 151