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

How do I extract variables from a list in fish?

So, I recently downloaded a cli which shares a lot of commands similar to linux. Like mega-login : login & mega-logout :logout and I am too tired of writing mega every time I need to use the cli. ...
2
votes
1answer
29 views

XDG_DATA_DIRS env variable using two separator types in fish shell

After doing an OS upgrade (opensuse leap 15.2 -> 15.3), my XDG setup broke. Among other things, my XDG_DATA_DIR env var uses two different value separators: : and . Current XDG_DATA_DIRS value: /...
0
votes
3answers
52 views

Is there a way to validate a completion file?

I have tool that is able to create a completion file for bash, zsh and fish. I normally use zsh, but i cannot get this completion file to work on zsh. So as a test i installed fish and created the ...
2
votes
1answer
45 views

What's the correct format for MAKEFLAGS when using Fish shell?

To improve compile times, the Arch wiki states, Users with multi-core/multi-processor systems can specify the number of jobs to run simultaneously. This can be accomplished with the use of nproc to ...
0
votes
0answers
46 views

fzf not using `$FZF_DEFAULT_COMMAND`

I'm trying to get fzf to use rg --files as its command for searching, but can't seem to get it to use the $FZF_DEFAULT_COMMAND environment variable, as described in the docs. I use fish as my shell, ...
1
vote
0answers
73 views

Fish Shell Showing /usr/bin/git after every command. Any way to remove this?

Been trying to find where this is coming from and I can't seem to figure it out. I know that It's the location of my git install, but not much else. Is it echoing somewhere from some sort of fish ...
1
vote
1answer
123 views

Using Fish Shell, how can I export a variable from within a file?

We can export variables from the command line with set -x, but I'd like to know how to do this from within a file. The reason is that I'm organizing my $HOME directory according to the XDG convention, ...
-1
votes
2answers
58 views

What does it mean to both append and prepend a value to a variable (in fish shell or in general)?

Per the fish shell documentation for the set command: append: causes the values to be appended to the current set of values for the variable. This can be used with --prepend to both append and ...
1
vote
1answer
70 views

Oh-my-zsh "take" command - Is there an equivalent in Fish?

Oh-my-zsh has the take command which creates a directory and enters into it in one step. Is there an equivalent command for the fish shell? I do know that I can do it with mkdir newDir && cd ...
1
vote
1answer
60 views

Fish environment variables/$PATH in applications started from Desktop Environment?

I'm specifically trying to get NVM to work on Elementary OS with Fish and IntelliJ. There is a fish script that works pretty well as long as I stay in the terminal. However, when I launch my IDE from ...
0
votes
1answer
21 views

Function tab-completion not matching that of wrapped command

I've got a function defined in my fish shell: function cl --wraps=cd cd $argv && ls -l --color=auto end According to man function, the --wraps option "causes the function to inherit ...
0
votes
1answer
29 views

fish - Maximum recursion depth reached with tab-complete

With my fish shell, I have defined the alias alias black='command black -l 110' When I type black in my shell and start to tab-complete, I get the error complete: maximum recursion depth reached ...
0
votes
0answers
47 views

Setting Fish Shell as default shell, prevents me from accessing commands

I used the following to set my default shell chsh -s `which fish` Which works great, but many commands such as brew and npm no longer works. Previously, accessing fish shell from zsh shell still ...
2
votes
3answers
117 views

fish shell alias only in specific directory

I am using fish and am working on a project with a script that's frequently invoked for build tasks called x.py. I'd like to create an alias that maps x to ./x.py. However, I only want this to apply ...
0
votes
1answer
72 views

Fish Shell: Start up script issue

I am not a coder or a programmer, I just try to learn but I have some limitations... I'd like to mount a webdav resource when I logging into the session (virtual console), however I'd like to check if ...
2
votes
1answer
80 views

Fish shell vi-mode is missing "repeat" command (dot/period/. key in Zsh)

I recently moved from Zsh to Fish, and I'm having a problem with vi-mode in Fish. There doesn't seem to be a "repeat" keybinding, like in Zsh's vi-mode (bound to the "dot" .). I ...
0
votes
1answer
43 views

MacOS/iTerm2/fish arrow keys stops working after terminating a process with ctrl+c

I am using iTerm2 on my mac pro, and using fish as my shell. Every time I have a process running and I break it by pressing ctrl+c, the arrow keys stops working after and starts emitting ^[[A etc. ...
2
votes
2answers
193 views

How do I add multiple fish functions in a single script?

I'm trying to shift to fish from zsh. As I've seen, load time of fish increases if I use alias. So I'd like to convert all of my alias into functions, but the thing is creating a function script for ...
1
vote
2answers
83 views

How to display stdout of command in `less` with as few keystrokes as possible?

I often find myself piping a command's output into less because less is far superior for studying the output than the normal terminal. While I can always append | less to every command, I was ...
1
vote
2answers
142 views

How to enable auto logout in fish shell?

A quick google search says I could enable auto logout (for text consoles) by setting a TMOUT parameter. However, I discovered later that this would only work with the bash shell. Is there a way I ...
2
votes
1answer
52 views

Fish - remove file before download

I run fish shell and it gives an exception when I try to remove a file which is not found. I have the following script: #!/usr/bin/fish set files "/tmp/*.xlsx" rm -f "$files" ...
1
vote
1answer
33 views

fish - Run multiple abbreviations with another abbreviation

I have a few abbreviations that I want to run on one command. Let's say given this config: abbr command1 "echo 1" abbr command2 "echo 2" abbr command3 "echo 3" I want ...
-1
votes
1answer
85 views

Having an interactive shell experience but running everything through dash

So i'm starting to get addicted to POSIX standards and simplicity yet i hate not having autocomplete using the arrows to go through characters and i want a cool shell prompt. so is there anyway that i ...
0
votes
0answers
63 views

How to create a keyboard shortcut for opening files after searching through fzf

I can launch a file after searching through fzf by doing xdg-open (fzf) (I'm using fish) or fzf | xargs xdg-open. But these do not work if I try to create a shortcut for opening a terminal and ...
1
vote
1answer
97 views

Fish completion script

I'm working on a completion script for a command, and I'm stuck. The docs and various websites I find don't fit what I need. The main command is pacstall and it has the flags: -I -S -R -C -U -V -L -Up ...
2
votes
2answers
66 views

How to preserve formatting in fish shell command substitution output stored in the var?

I'm already scratching my head for a while because of this: > cat file line1 line2 > set tst (cat file) > echo "$tst" line1 line2 > set tst "(cat file)" > echo &...
0
votes
2answers
286 views

Environment variables in Fish

I need to use a program called Kpax, the "installation" process consist in this: (for bash users, edit ~/.bashrc) export KPAX_ROOT=/home/dritchie/kpax <- substitute the proper ...
-2
votes
1answer
89 views

Difference between the shells [closed]

I've been using Linux Mint since March 2020, and I haven't used any shells other than the Bash shell. So what exactly is the difference between the Bash shell and the other shells (Fish, Zsh, Ksh, ...
1
vote
0answers
72 views

Make any program "think" its output is a terminal (ie stop it from "knowing" its output is a pipe/file/substitution/etc) to keep ansi-color-codes etc [duplicate]

EDIT: specifically what worked for me was using the python script in this answer and I gave the tweaks I used to get it working for my autoloading functions in fishshell, and on ubuntu 20.04, in this ...
0
votes
0answers
85 views

How to make --exclude-glob work with this use case of lftp and fish shell?

I have a statement that looks like this: set cmd 'set ssl:verify-certificate false; open -u abc,def ftp.somewhere.com; mirror --only-newer --exclude-glob "{.git|node_modules|wp-config.php}" \...
0
votes
1answer
248 views

xfce terminal ignores set default shell

I changed the default shell with chsh -s `which fish` but my terminal still launches with bash. If I run chsh again, it says chsh: Shell not changed. I'm using Manjaro x86_64 20.2.1 with XFCE (4.16). ...
1
vote
1answer
180 views

What is the purpose of (and possibly the convention of using) multiple locations for user configuration in fish shell

I have recently moved to fish from bash. I'm immediately in love with the out-of-the-box functionality, but I'm a little bit at a loss when it comes to configuring the shell. I've read through the ...
1
vote
1answer
76 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
51 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
207 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
96 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
60 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 ...
2
votes
1answer
107 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
170 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
1k 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
88 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
117 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
2k 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
342 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
59 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
68 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
226 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 `...
1
vote
1answer
1k 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 ...
4
votes
1answer
695 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
65 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 ...