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
1
vote
1answer
18 views

How to use hjkl to navigate menu select in fish shell

I can't seem to find any information on how to navigate tab completion or how to bind keys in tab completion in fish shell. This is what I am trying to achieve but in fish shell rather than zsh. Fish-...
0
votes
0answers
45 views

How to get output one page at a time in Fish shell? [duplicate]

I am using a Fish shell and when I search through file with grep, I usually get a long output, which is difficult to further search through. If I use something like this grep -r 'email' . | less, I ...
0
votes
2answers
56 views

How to change shell without the command line

Something broke my fish and I have no idea how to fix it so is there a way to change shell to zsh without using the command line
2
votes
0answers
49 views

Memory usage out-of-control with shell command, but not with shell script

[Linux Mint 20.1, 16GB RAM, 16GB swap] I recently converted my system - root and backup partitions - to BTRFS. I've been experimenting with archiving some of root's snapshots to my backup drive, but ...
1
vote
0answers
37 views

urxvt writing over itself and leaving colored spaces

URXVT is writing over itself and leaving behind colored spaces... I feel like this is easier shown than described: This started occurring overnight without making any changes, so I'm not sure where ...
1
vote
1answer
32 views

How to write a command to history in fish shell?

In the zsh shell, I can write something into the command line history like so: #!/bin/zsh cmd="cd /special/dir" print -s $cmd" # save command in history for reuse How may I do ...
2
votes
0answers
68 views

Ranger image preview not working in URXVT running Fish shell until I open an image in Feh

I recently started using the Fish shell, and after opening a new URXVT instance I cannot get image previews in Ranger until I open an image first (using feh, in my case). Once an image has been opened ...
0
votes
1answer
381 views

Error in terminal emulator: Alacritty

I installed Garuda Linux today. The default shell emulator is Alacritty and the default shell, fish. However, after the update to the system, its constantly giving a warning: Config error: shell: data ...
2
votes
1answer
50 views

Is it possible to disable the & ampersand character in fish shell? (make escaping with \& unnecessary)

So it is possible to permanently disable the functionality of ?, making \? unnecessary, by enabling the qmark-noglob feature flag. I would like to do the same thing for &, as I never use it for ...
-1
votes
1answer
48 views

How to set environmental variables in Fish?

Guys I recently switched to fish from Bash and I've run into problems setting some specific variables for golang in fish. In my bashrc I would set them using: export PATH="$PATH:$(go env GOPATH)/...
1
vote
1answer
359 views

Fish: The file is not executable by this user

I made fish function in ~/.config/fish/functions/confgit.fish: function confgit /home/john/Projects/confgit $argv end But when I run this function it just says: fish: The file “/home/john/...
5
votes
1answer
168 views

xargs | Use input as command

I would have assumed that following examples work perfectly fine. $ which -a python python3 pip | xargs -I {} {} --version No '{}' such file or folder $ which -a python python3 pip | xargs -I _ _ --...
1
vote
2answers
40 views

test standard output with fish

I have a script that prints a string to terminal, and I want to check value of myScript output.(in this case resultString) I tried with this method, but it didn't worked. (for simplicty i replaced my ...
1
vote
1answer
53 views

Resume n jobs to background concurrently

I have many paused jobs in my shell. I would like to run bg for all of the jobs with a maximum four jobs running concurrently. I know I can use GNU parallel for new tasks but I would like a BASH or ...
0
votes
2answers
84 views

run for loop with bash command in fish shell

I'm trying to run a simple command on my fish shell, but I am not able to execute. It just keeps adding lines for me to add additional data to, not sure on how to execute accordingly. $ for acc in `...
0
votes
1answer
225 views

How to fix Error: Whenever I type something in terminal there is an error

I use fish as my login terminal. I was trying to run android simulator. I already edited my bash profile so I switched to bash by typing bash. I restarted my terminal after I logged off my computer ...
2
votes
1answer
167 views

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.
0
votes
1answer
36 views

How to lock my session as soon as I login?

I'm on Manjaro Gnome (using fish) and I want to enable Automatic Login and then force the session to lock. The idea being that I can boot and walk away from my computer, knowing that it will continue ...
0
votes
1answer
41 views

How can I get numbers in fish history

I'm using fish shell but the history command in this returns something like ls cd Downloads ls mkdir new_folder whereas, the same thing in zsh would return 399 ls 400 cd Downloads 401 ls 402 mkdir ...
0
votes
2answers
56 views

Get count of occurrences of each word in document

How can I find count of every word in a file? I want a histogram of each word in text pipe or document. New line and empty lines will exist in document. I stripped everything except for [a-zA-Z]. > ...
1
vote
1answer
266 views

fish shell : capture multi-line output to a variable with piping or read

if you curl https://www.toptal.com/developers/gitignore/api/python you see the file as expected, with newlines. But if I set response (curl https://www.toptal.com/developers/gitignore/api/python) ...
1
vote
1answer
16 views

fish alternatives for [[ pattern tests ]]

Trying fish, I am stuck on some bash conditionals using [[ ... ]]. It looks like [ ... ] is the usual thing, but I'm stuck on pattern and regular expression tests: [[ "$PATH" =~ "$1&...
1
vote
1answer
51 views

fish equivalent of ${this:-that} expansion and similar

Trying fish, I am stuck on equivalents for some of the variable expansions from bash: x=${this:-$that} x=${this:-that} How do I do that in fish?
4
votes
1answer
111 views

kill %1 equivalent in fish

In bash, if I run kill %1, it kills a backgrounded command in the current shell (the most recent one, I believe). Is there an equivalent of this in fish? I haven't been able to find it online in a bit ...
1
vote
0answers
149 views

Set permanent environment variable for all shells

I want to set the root level environment variable that comes from sh(1) so that it is shared across all shells: sh, bash, zsh, and fish. I can see in /etc/profile there's a command /usr/libexec/...
1
vote
1answer
384 views

Error starting the fish_config web ui in WSL

I want to customize my fish shell using the Web UI mode, but when running fish_config colors, the following error is shown. surface@Surface ~> fish_config starting-colors Web config started at file:...
2
votes
2answers
260 views

check if variable is null in fish

I want to check a condition if a variable is null in fish(friendly interactive shell). if test "$argv" = null # do something... else # do something else...
0
votes
2answers
106 views

Stop fish complaining: fish: $? is not the exit status. In fish, please use $status

I am building a script that should work in csh, bash, and fish with no change: This does the right thing in all the shells, perl -e '$bash=shift;$csh=shift;for(@ARGV){unlink;rmdir;}if($bash=~s/h//){...
1
vote
1answer
35 views

How to put the time string into the fish shell's prompt?

Currently I use this theme for fish, installed using fisher. This is how it shows up now: I would like the time string (e.g. 19:19) to be shown before the /m or after react or after the part with ...
3
votes
1answer
97 views

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 ...
2
votes
1answer
574 views

How can I make xfce4-terminal start fish shell?

I want to use FISH shell. But I've read FISH is not a POSIX shell so setting it to default shell by chsh is not recommended. What I want is whenever I start xfce4-terminal I would like to start FISH ...
0
votes
3answers
380 views

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 ...
0
votes
1answer
65 views

Enabling fish-style manpage-based completion in bash

One of the really appealing features of fish is that it supports intelligent tab completion of options based on their specifications in each command's respective manpage. Has anyone created a way to ...
0
votes
0answers
36 views

Fish shell error

When I type command in fish shell, after command it returns: Could not send own process 401, 'sed' in job 3, 'commandline | sed 's|\s\+|\x1e|g'' from group 400 to group 400 setpgid: unknown error (...
2
votes
1answer
47 views

fish equivalent for sequence of commands — { cmd1 ; cmd2; }

In bash, you can pipe the same output to two commands using {}, i.e. in the following: cmd0 | { cmd1 ; cmd2 ;} | cmd3 cmd1 and cmd2 get the output of cmd0 in their stdin, and cmd3 gets the output of ...
2
votes
1answer
196 views

Fish shell, disable pager navigation through Tab / Shift Tab

Fish is a great shell (the best?) but its completion interface has a particular quirk that I personally don't like and would like to disable. It's expressed by this sentence in the tutorial: Hit ...
0
votes
0answers
50 views

I'm not able to figure out why fish-shell is not able to read my scripts directory from $PATH

After my failed attempt to unify my bash and fish configuration, I have finally separated both and 'hoping' that things should be fine now. As per the suggestions I received (against trying to re-use ...
1
vote
2answers
422 views

Starting Fish terminal from bashrc breaks standard terminal input

I've added a command to start fish terminal from bashrc and so far it was working ok. I've just added this line at the end of bashrc fish But after I quit fish to default shell current input isn't ...
0
votes
4answers
711 views

sed replace newline character with space

How can I use sed to replace new line character with any other character? Input: I cannot conceive that anybody will require multiplications at the rate of 40,000 or even 4,000 per hour ... ...
0
votes
1answer
166 views

Permission denied in fish shell on Debian when I edited the oh-my-fish “theme” file

I edited the "theme" file to display "bobthefish" instead of "default" using Windows. <W> fish: An error occurred while redirecting file “/home/purplesci/.config/omf/theme” open: Permission ...
0
votes
0answers
58 views

Symbols showing on blue background in Debian with oh-my-fish on WSL

I am using fish-shell on Debian with oh-my-fish installed. When I run the shell, it shows the prompt not on the black bckground, but on the light blue instead. This is running in Windows Terminal ...
1
vote
0answers
915 views

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>/&...
0
votes
1answer
423 views

Set default interpreter in fish shell

I've installed mill on arch linux with fish as my default shell. Since the file /usr/bin/mill doesn't start with a shebang, fish won't execute the file. Instead it responds with $ mill Failed to ...
1
vote
1answer
385 views

Automatically print number of lines of command line output

In my fish shell, I am using fish command timer to automatically show the duration of each command after it has been executed. This is a neat feature, which I recommend. Now I want something similar ...
3
votes
0answers
35 views

Tracing environment variable modification

Pesky $PATH, there's one item I used to use ~/.workspace/bin. I just can't figure where its coming from. I changed the user shell to /bin/sh, and logged in from tty, checked PATH, and it was clear of ...
3
votes
2answers
221 views

Issue with type force PATH search

This is Bash. The behavior is similar in fish. $ which python /usr/bin/python $ alias py=python $ type py py is aliased to `python' ​And then, running type -P py prints nothing, where as I expected ...
1
vote
2answers
751 views

How to install fish in a remote server I cannot sudo?

I want to install the fish shell in a remote server I have no sudo privileges at, so that I can use it whenever I ssh.
2
votes
1answer
887 views

Does one string contain another in fish shell?

I am working on my fish.config for using the fish shell. I am trying to compare strings using bash syntax but fish doesn't accept the syntax. There is clearly another way to do it. Any suggestions ...
7
votes
3answers
5k views

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) ...
3
votes
2answers
1k views

How to use fish on remote servers that have it installed without changing login shell?

I regularly ssh on several different servers, some of which don't have fish installed, but many do. I'd like to get fish as shell if available (changing midway is always tedious, and you lose the ...