Questions tagged [fish]
The friendly interactive shell (fish) is a Unix shell that focuses on interactive use, discoverability, and user friendliness.
190
questions
0
votes
0
answers
19
views
curser desync when connecting to a fish shell on a raspberry pi over ssh
This is a rather specific issue, but I wouldn't be surprised if it occurs due to some more general shortcoming.
In short, the issue is that, when using the fish shell in my Raspberry Pi, over ssh, ...
0
votes
1
answer
28
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 ...
1
vote
2
answers
93
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 ...
0
votes
2
answers
220
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 ...
0
votes
1
answer
125
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 .
...
3
votes
1
answer
132
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 ...
0
votes
1
answer
123
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 ...
0
votes
1
answer
666
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 ...
0
votes
1
answer
523
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?
3
votes
1
answer
3k
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 ...
5
votes
2
answers
906
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 ...
3
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. ...
0
votes
1
answer
691
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 ...
1
vote
1
answer
457
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.
0
votes
1
answer
304
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)'
...
1
vote
1
answer
163
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, ...
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 ...
1
vote
1
answer
520
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 ...
1
vote
1
answer
303
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 ...
1
vote
3
answers
965
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 ...
5
votes
3
answers
13k
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
-1
votes
1
answer
594
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.
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 ...
2
votes
1
answer
1k
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?
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 ...
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 ...
0
votes
1
answer
771
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?
2
votes
1
answer
924
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 ...
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 ...
3
votes
3
answers
694
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 "* (...
1
vote
1
answer
709
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/ ...
1
vote
1
answer
261
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 ...
0
votes
1
answer
897
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 ...
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 ...
1
vote
0
answers
183
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-...
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 $...
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 $...
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, ...
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 (...
0
votes
0
answers
109
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 ~; ...
0
votes
1
answer
283
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, ...
1
vote
1
answer
62
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 ...
1
vote
1
answer
361
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 ...
0
votes
1
answer
1k
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:
...
1
vote
2
answers
366
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 ...
2
votes
1
answer
1k
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 ...
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)?
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 ...
3
votes
1
answer
376
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 '/...
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? ...