Questions tagged [fish]
Fish is a unix shell with a clean design and a limited but powerful feature set.
267 questions
1
vote
1
answer
104
views
Using fish as default shell in Terminal on macOS causes .command files to fail
This question was previously asked here: https://stackoverflow.com/questions/74808784/after-switching-default-shell-command-file-just-opens-terminal
However, I have found no reason for the behavior, ...
3
votes
1
answer
204
views
I rewrote Fish path and broke everything
I'm on MacOs and have been using the shell Fish for quite some time now (installed with Homebrew). Today, I wanted to install vcpkg. I followed the instructions on Microsoft website, and wanted to add ...
-2
votes
1
answer
58
views
Where to store a file with abbr statements that is sourced from config.fish?
I have fish started from zsh. In my config.fish there is a line
source ~/.config/fish/easy-tor.fish
easy-tor.fish is simply a bunch of abbr statements to quickly turn command-line Tor and SOCKS5 ...
1
vote
1
answer
388
views
Remove certain path from $PATH
To add something to $PATH in fish, I use
fish_add_path -a ~/foo/bar
Then fish adds ~/foo/bar to my ~/.config/fish/fish_variables:
SETUVAR fish_user_paths:/Users/john/foo/bar
Then, is it correct to ...
-1
votes
1
answer
90
views
zsh alias causes error if used in fish
I have the following aliases in my zsh:
alias -- -='cd -'
alias ..='cd ..'
alias ...='cd ../..'
When I switch to fish, by manually typing fish and pressing Return, the first alias causes an error:
- (...
0
votes
1
answer
126
views
Inheriting path modifications vs. Inheriting aliases
My login shell is zsh. I have added the following two lines to my .zprofile file:
path+=$HOME/foobar123
alias foo='echo bar'
Then, if I switch to bash or fish, by typing bash or fish and pressing ...
0
votes
1
answer
285
views
Trying to set a keyboard shortcut to the fish shell desktop application
How can one open the fish terminal with a keyboard shortcut like ctl-alt-t in the gnome desktop environment running on debian?
Steps I have taken:
Installed the fish shell and run it from gnome-...
0
votes
0
answers
121
views
All commands need Ctrl-c in Linux terminal
Each time I type a command in Linux terminal, the cursor doesn't go to a newline and I have to Ctrl-c in order to get a newline.
I already tried the reset command but it doesn't work.
This happened ...
0
votes
1
answer
143
views
Fish shell add args to $EDITOR using export
How can I add args to the command I use as the $EDITOR in fish shell? Specifically using the export EDITOR=... syntax rather than the set command.
I want to do something like export EDITOR='code --...
1
vote
2
answers
242
views
How to expand stdin in fish?
In kakoune (vim-like editor) I can press pipe, type a command, press enter, and it will run the command using the current selection as input, and replace that selection with the output of the command ...
1
vote
1
answer
131
views
Fish shell: what to use instead of "function --shadow-builtin"
I tried the fish shell some years ago but abandoned it for now forgotten reasons (there was something that I couldn't do with it).
I'm looking a fish again and trying to update my old scripts to work ...
1
vote
3
answers
315
views
Fish: To match only files or only folders
In Zsh, to match only non-directory files or only regular files or only directory files, I can use *(^/), *(.) and *(/) (or *(^/D), *(.D) and *(/D), if I need to include hidden ones).
Is it possible ...
1
vote
1
answer
274
views
Fish: To match both dot and non-dot files when wildcarding
Hidden files (where the name begins with a dot) are not considered when wildcarding unless the wildcard string has a dot in that place. E.g., ~/.* matches all hidden files and directories in your home ...
0
votes
1
answer
576
views
Can't install FISH on Amazon Linux 2023
I have an EC2 instance running Amazon Linux 2023. I added the fish repo per the instructions. I used dnf config-manager --add-repo... and then dnf config-manager --enable-repo.... I also added g++, ...
1
vote
0
answers
32
views
Fish script works as function, but not as standalone script [duplicate]
I have a small function that activates my desired Python venv - pya venv python_version - so something like this:
pya vm_info 3.10.12
As a fish function, this works perfectly:
function pya
set -l ...
1
vote
1
answer
232
views
Fish access non-aliased command from alias
How can I access the non-aliased version of a command from within the alias for that command? In bash, I can do something like alias ls='\ls -l' to access the non-aliased ls inside this alias for ls. ...
1
vote
2
answers
1k
views
Batch convert flac to ogg with ffmpeg
I'm trying to turn this command into one that will convert a whole directory from flac to ogg:
ffmpeg -i musicfile.flac musicfile.ogg
I've read through the man page. But honestly it's a bit over my ...
2
votes
3
answers
280
views
In Fish, how do I cd to the closest parent with a .git directory?
I use Fish shell. Sometimes, I find myself in a child directory of a child directory of a child directory, several layers deep, and I want to return to the closest parent with a .git directory, as ...
2
votes
1
answer
3k
views
fish 'Invalid redirection target' error
This command works well in Bash and Zsh:
expac -H M "%011m\t%-20n\t%10d" $(comm -23 <(pacman -Qqen | sort) <({ pacman -Qqg xorg; expac -l '\n' '%E' base; } | sort -u)) | sort -n
But ...
1
vote
2
answers
1k
views
git autocompletions in Fish: how can I disable them or speed them up?
I'm running Fish shell (3.6.0) on Ubuntu. Let's say that I'm trying to run git add foo/bar.txt . I type:
git add foo
and then I press tab . Now the shell freezes up for a few seconds. Even pressing ...
0
votes
0
answers
62
views
Fish shell can't change directory over a Webdav resource through Rclone
Fish can't cd into a folder on a Webdav remote directory through Rclone:
Welcome to fish, the friendly interactive shell
Type `help` for instructions on how to use fish
drive ) ls
Documents/ Music/ ...
3
votes
2
answers
2k
views
FISH: failed to execute process...variable exceeds the OS argument length limit
I keep getting an error when I cd to my project root directory that is on github:
> cd ~/go/src/github.com/mygithub/myapp
The below message auto pops up because I am using tide prompt which links ...
0
votes
0
answers
1k
views
direnv and environment variables
I'm trying to get autoactivation of conda/mamba environments working using direnv but I'm running across a problem that seems to be due to my lack of understanding of how bash scripts work with ...
6
votes
1
answer
515
views
Fish equivalent of Bash / readline's Ctrl-O "operate-and-get-next"
Readline and therefore Bash have a very useful command called operate-and-get-next, bound by default to Ctrl-O, that executes the current line, after selecting it from the history, and advances the ...
0
votes
0
answers
704
views
Trying to change "non command" color in kitty terminal (ver. 0.21.2) using the fish (ver. 3.3.1) shell with the oh-my-fish theme slacker
I've been trying to change the color of non-command such as the picture below (the uncompleated 'help')
link to the theme im using in omf: https://github.com/maqboolkhan/omf-theme-slacker
my kitty....