Skip to main content
Share Your Experience: Take the 2024 Developer 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
0 votes
1 answer
20 views

How do you not load fish's built-in functions?

I'm doing some experimenting with fish, and I tried looping over the subdirectories of the current directory, something I do often in bash. fish's syntax is similar, and it was easy to just echo each ...
vr8ce's user avatar
  • 101
1 vote
2 answers
69 views

Show long commands in fish (ctrl+r) history on multiple lines

I'm looking for a solution to searching history with fish when your history is full of long commands. I often have curl commands that contain json payloads in my history that I want to repeat, for ...
Anthony Naddeo's user avatar
-1 votes
2 answers
149 views

alias doesn't work in fish shell on macOS

I've been struggling with an issue that I cannot find mentioned anywhere and I cannot trace down. I can't leverage any of the alias command functionality in fish, which also breaks fish integrations ...
Adrian's user avatar
  • 206
0 votes
1 answer
122 views

How to view a folder with the name of "."?

A folder that is named ".", just dot and nothing else, does not appear in dolphin or krusader file managers. ls -a shows the folder. Terminal output: drwxrwxrwx - root 29 Feb 17:05 . ...
Rashiq's user avatar
  • 171
2 votes
0 answers
86 views

How do I get iTerm2's prompt to make marks when the prompt is Starship?

I've run into a situation where installing Starship breaks the iTerm2 shell integration feature of making each prompt a "mark". The only thing Terminal.app has that iTerm doesn't for me is ...
Evan's user avatar
  • 21
0 votes
1 answer
117 views

Is it possible to manipulate shell input to wrap commands?

I would like to call a function when a command is entered and modify it for example if a user enters this command touch foo.txt I want to manipulate it to run sudo -u user touch foo.txt The reason ...
phper's user avatar
  • 105
0 votes
1 answer
582 views

Windows Terminal - Start a new tab using the cli and run a command with fish

I am using the wt.exe CLI to run some WSL commands in a new tab. However, I seem to be getting some weird error when using Fish shell. The command: wt.exe --window 0 new-tab -p Ubuntu /usr/bin/fish -C ...
user3690467's user avatar
0 votes
1 answer
457 views

How to resolve fish: "Unable to open universal variable file '/': Permission denied"?

Fish gives frequent warnings error: Unable to open universal variable file '/': Permission denied What causes this, and how can it be resolved?
sjdh's user avatar
  • 111
3 votes
1 answer
2k views

how to move ssh-key related files to another directory?

i've been trying to clean up my root directory so that it isn't clustered with random dotfiles. nonetheless, on setting up the ssh-key i came to a dead-end, where i wouldn't find a way to migrate ...
Lanny's user avatar
  • 33
5 votes
2 answers
876 views

How to split a string (of arguments) in fish?

I want to split "-r --run" into "-r" and "--run" for string split " " "-r --run" I get string split: -r --run: unknown option` as an error It is ...
RHOOPH's user avatar
  • 113
2 votes
2 answers
1k views

How to save abbreviation in fish?

Running abbr --add ro rpm-ostree will set the abbreviation and it works as expected. But once I exit the shell with exit and then re-enter the shell by typing fish again, all abbreviations are lost. ...
RHOOPH's user avatar
  • 113
0 votes
1 answer
650 views

Can't change terminal colors for prompts in Ubuntu on Windows Terminal

I run Ubuntu with fish using wsl on Windows Terminal. I have color scheme configured correctly and it seems that all the colors are changed except for the prompt colors. It remains red on typing and ...
Peter S.'s user avatar
  • 101
1 vote
1 answer
425 views

Fish shell: Map jk to enter normal mode (in vi mode)

While using vi keybindings in fish shell, is it possible to map jk to enter Normal mode? Currently Escape is used for doing that but I want to change (or add a new way) to do so.
GoodBoyNeon's user avatar
0 votes
1 answer
287 views

Hardcoding current path to alias

I am developing a simple cli-application for timetracking. The idea is to have fish-aliases source r-scripts to create timestamps in a timetable. Like so: alias checkin='rscript (echo $PWD/checkin.R)' ...
s_dav's user avatar
  • 25
1 vote
1 answer
152 views

How to disable SVN function in Fish shell?

How to disable a specific feature in the fish shell? For example, I want to disable the Subversion integration. When I enter in a directory (cd) of whatever medium-to-big repository with Subversion, ...
Valerio Bozz's user avatar
0 votes
0 answers
14 views

How to migrate universal variables between computers in fish shell [duplicate]

I recently changed laptops. I have all the original files for fish configuration, including the ~/.config/fish/fish_variables. But I cannot source that file and it says I cannot change it. So, how do ...
Roberto Morávia's user avatar
1 vote
1 answer
477 views

Preserve command history in chronological order (in fish)

I have noticed that default behaviour for storing command history is only storing the latest entry. Typing ls and then ls -al and then entering history would show: ls -al ls Typing ls once more would ...
s_dav's user avatar
  • 25
1 vote
1 answer
290 views

PYTHONPATH defined on multiple vs single line in fish shell

I noticed that set -xg PYTHONPATH "/path/to/dir1" set -xg PYTHONPATH $PYTHONPATH "/path/to/dir2" works, whereas set -xg PYTHONPATH "/path/to/dir1 /path/to/dir2" does ...
Labrador's user avatar
  • 143
1 vote
3 answers
905 views

How does one inspect command history in fish in vi mode?

I'm a new user to Fish. I use vi command line bindings. I understand from various places (like here and the issue comments here, for instance) that history search and recall can lack certain bindings ...
firebush's user avatar
  • 429
5 votes
3 answers
12k views

how to run ssh-agent in fish shell?

I was running eval `ssh-agent -s\` I get this error fish: Unknown command: `ssh-agent
Shriman Keshri's user avatar
-1 votes
1 answer
579 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.
alicode1111's user avatar
1 vote
1 answer
2k 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 ...
Tyler Shellberg's user avatar
2 votes
1 answer
955 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?
quiltedcomputer's user avatar
3 votes
1 answer
1k 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 ...
Michael's user avatar
  • 61
1 vote
1 answer
1k 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 ...
navneethc's user avatar
  • 111
0 votes
1 answer
731 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?
Ben Keil's user avatar
  • 101
2 votes
1 answer
882 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 ...
Cypress's user avatar
  • 121
2 votes
2 answers
2k 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 ...
Hommer Smith's user avatar
3 votes
3 answers
679 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 "* (...
Augusto's user avatar
  • 133
1 vote
1 answer
691 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/ ...
Quappas's user avatar
  • 15
0 votes
0 answers
237 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 ...
Ser's user avatar
  • 101
0 votes
1 answer
880 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 ...
wheres_the_github_login's user avatar
1 vote
1 answer
1k 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 ...
MauriceNino's user avatar
1 vote
0 answers
174 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-...
Xster's user avatar
  • 2,905
0 votes
2 answers
2k 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 $...
TheFibonacciEffect's user avatar
2 votes
1 answer
1k 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 $...
ptpdlc's user avatar
  • 185
3 votes
1 answer
8k 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, ...
Nils's user avatar
  • 71
1 vote
1 answer
182 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 (...
Shock9616's user avatar
0 votes
0 answers
108 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 ~; ...
ptk's user avatar
  • 127
0 votes
1 answer
276 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, ...
ZackT's user avatar
  • 93
1 vote
1 answer
59 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 ...
bataliero1234's user avatar
1 vote
1 answer
347 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 ...
Sam Mason's user avatar
  • 309
0 votes
1 answer
982 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: ...
Paul Schuldesz's user avatar
1 vote
2 answers
355 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 ...
jiwopene's user avatar
  • 349
2 votes
1 answer
991 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 ...
CodeGnome's user avatar
  • 2,091
1 vote
1 answer
1k 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)?
Xster's user avatar
  • 2,905
6 votes
2 answers
1k 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 ...
John Feminella's user avatar
3 votes
1 answer
364 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 '/...
snapshoe's user avatar
  • 1,156
6 votes
2 answers
2k 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? ...
tom's user avatar
  • 201
0 votes
0 answers
3k 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 ...
apfsx's user avatar
  • 1