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
3 votes
1 answer
93 views

Fish: Concise way to output elements of list on separate lines

I am wondering if there is a concise way to output the elements of a fish list on separate lines. I know I can do e.g. echo $PATH | tr ' ' '\n' to achieve the desired output, e.g.: /usr/local/sbin /...
josmith42's user avatar
  • 198
3 votes
3 answers
2k views

Powerline and Fish: How can I remove the large whitespace between the shell prompt and cursor?

I recently started using Arch Linux and just installed Powerline and Fish (version 3.0.0) last week. In my terminal, which is Termite (version 14), there's a large (horizontal) space between the shell ...
Qhapaq Qowi's user avatar
3 votes
1 answer
7k 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
3 votes
1 answer
355 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
3 votes
1 answer
1k views

How to use the $_ positional parameter in the fish shell?

In Bash, the positional parameter $_ holds the last argument in the previous command: $ /home/joe> some-script foo bar $ /home/joe> cd $_ $ /home/joe/bar> The positional parameter $_ does ...
Ashwin Nanjappa'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
3 votes
3 answers
655 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
3 votes
1 answer
2k views

How to chain a group of commands in Fish like { … } Bash?

I'm aware of chain Fish commands via && or || but I'm willing to chain a set of commands Code env git clone --depth=1 https://github.com/rafaelrinaldi/theme-pure.git; or { printf "Error: ...
Édouard Lopez's user avatar
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
3 votes
1 answer
11k views

Installing Homebrew with fish-shell

I recently had a mishap with MySQL and when I uninstalled it from System Preferences it uninstalled Homebrew as well (I checked the erase all files that are related to MySQL, which was probably not ...
WaterTrash's user avatar
3 votes
2 answers
3k views

What's causing the file is not executable by user on the windows subsystem for linux?

This seems to have randomly started a few days ago. It used to be fine to run fish shell from Ubuntu bash for Windows. But suddenly when I hit Tab for autocomplete, it barfs with: The file "x86" is ...
Wayne Werner's user avatar
  • 2,333
2 votes
3 answers
6k views

How do I set the title of Terminal.app with the fish shell?

I'm trying the fish shell in Mac OS X, intalled using MacPorts. I'd like to have the title of my Terminal window be my current directory. Currently, the title just says Terminal - fish - 80x24 ...
Lorin Hochstein's user avatar
2 votes
3 answers
139 views

What's the fatest way to calculate in command line?

Is there a faster way to calculate in command line the following: echo "4 * 5" | bc
Texom512's user avatar
  • 131
2 votes
2 answers
950 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
2 votes
3 answers
7k views

tmux.conf is giving syntax error

My .tmux.conf is # https://github.com/seebi/tmux-colors-solarized/blob/master/tmuxcolors-256.conf set-option -g status-style bg=colour235,fg=colour136,default # bg=base02, fg=yellow # set window ...
MathIsNice1729's user avatar
2 votes
1 answer
1k views

How do I run make && make install while in fish shell

I have installed the fish shell, and I'm very happy with it ... but I cannot run the following command: make && make install This works nicely in bash... How do I run it in fish shell?
Ferenc Deak's user avatar
2 votes
2 answers
932 views

Fish shell syntax highlighting looks weird in byobu-screen

When I am in plain fish shell, a command is highlighted like so: but when I am in byobu-screen and type the same thing, I get: When I do a fish_config and look at my color palette, nothing is set to ...
David Sawyer's user avatar
2 votes
1 answer
893 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
2 votes
1 answer
2k views

Fish Shell: remapping VI-mode keybindings

I want to remap some of the default movement bindings in fish's vi-mode (I'm using version 3.0). Specifically I want to change the $ and ^ key mappings to be E and B respectively to match what I use ...
Arthur Allshire's user avatar
2 votes
2 answers
2k views

Failed to login after setting fish as default shell

I tried fish for a while, and then i wanted to set it as my default shell. I edited /etc/passwd and changed the shell of my user to /bin/fish. The problem is I couldn't login anymore. I tried through ...
Andy3153's user avatar
  • 123
2 votes
2 answers
143 views

Combining functions in Fish

In Fish shell I have two functions: function be bundle exec $argv end function rdbm rake db:migrate end I typically use them together, i.e. bundle exec rake db:migrate but not always, so I'd ...
max pleaner's user avatar
2 votes
1 answer
1k views

How to show fish shell completions in a menu and window pressing tab

Currently fish shell (2.3.1) shows the completion list after pressing Tab. You can navigate through the list using the arrow keys or Tab. If possible, how can I show the completion list in a pop menu ...
Andrew-Dufresne's user avatar
2 votes
2 answers
1k views

Using rbenv with the fish shell

When using the recommanded way to setup rbenv, `eval "$(rbenv init -)", I get: $(...) is not supported. In fish, please use '(rbenv)'. ~/.config/fish/config.fish (line 5): eval "$(rbenv init -)" ...
Dorian's user avatar
  • 1,521
2 votes
1 answer
1k views

How can I enable tab completion for a fish function/alias?

Probably easier to just use an example here. I have a function ss that just calls: sudo systemctl $argv Tab completion works fine with the full command, but not for the ss function. I.e., ss start ...
mkaito's user avatar
  • 2,072
2 votes
1 answer
594 views

Can't start new fish session after incorrectly closing fish_config

I'm trying out fish (the friendly interactive shell), and tried out the browser-based config with fish_config. I didn't close this correctly. I hit ctrl-C in my shell. Now I see the error "The ...
chadoh's user avatar
  • 19.9k
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
2 votes
1 answer
947 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
2 votes
1 answer
1k views

Is there a Fish equivalent to "bash --rcfile ~/.bashrc"

I've just moved over to fish shell after years of Bash. I've ported all of my functions over pretty easily except for a very simple one I have called mkroot: mkroot () { sudo bash --rcfile ~/...
Adam Shand's user avatar
2 votes
1 answer
960 views

How to Expand Abbreviations Inline in Fish Shell?

I'm trying to save some time in Fish Shell by setting an abbreviation (nu) to expand to the string: my-username@my-ip-address:/home/my-username What I'm hoping to achieve is to enter: scp some-file ...
JMTusk_16's user avatar
  • 211
2 votes
1 answer
44 views

Void folder is taking megabytes of space in OSX

xxx@MacBook- ~/D/p/a/Project5_min> du -sh * 2.6M app 4.0K build.gradle 60K gradle 4.0K gradle.properties 8.0K gradlew 4.0K gradlew.bat 4.0K instruction.txt 4.0K local....
kmb's user avatar
  • 175
2 votes
1 answer
681 views

how to open tcp connection in fish shell

I am looking for a way to open TCP connections in fish shell. In bash, I can do the following to open a TCP connection. This is quick telnet type test when telnet is not installed. $ echo > /dev/...
nelaaro's user avatar
  • 13.6k
2 votes
1 answer
684 views

PYTHONPATH Getting set in Bash Shell to incorrect value

OS: macOS Sierra Beta 6 Python: 2.7 Shell: Fish I am having issues with my PYTHONPATH environmental variable being set correctly. In my fish_config file, I have this line setting up PYTHONPATH: set ...
rplankenhorn's user avatar
2 votes
2 answers
633 views

Escape-backspace behavior in fish shell like in other shells

I recently started using the fish shell for some things and generally like it. However I've run across one situation that would be great if there were a workaround. Say I typed a command like this: ...
Devin's user avatar
  • 227
2 votes
1 answer
1k views

writing more complex math input to fish shell

The fish documentation explains that the math command is essentially a thin wrapper to bc. The bc documentation has further info about more complex ops: If bc is invoked with the -l option, a math ...
bright-star's user avatar
  • 1,599
2 votes
1 answer
843 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
1 answer
274 views

How to sync fish's universal variables across different computers?

If you change some universal variables, how do you sync them across computers? The comments on the fishd.* files make it seem like a bad idea to sync those files. And fishd's man pages don't seem to ...
Xster's user avatar
  • 2,905
2 votes
1 answer
3k views

Specifying an alternate shell with rsync

I'm using rsync to sync up files between two computers. On one machine, my default shell is set to fish, which breaks rsync ("protocol version mismatch -- is your shell clean?"). Is there a way to ...
Drew DeVault's user avatar
2 votes
1 answer
329 views

How do you install pythonbrew when using the Fish Shell?

I use the Fish shell in Mac OS X and I cannot figure out how to install pythonbrew. Is this possible and if so how? What I think I need to figure out is how to convert the following for my .bashrc to ...
Christopher's user avatar
2 votes
0 answers
45 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
2 votes
1 answer
571 views

Fish Shell - Virtualenv path not prepended to PATH

I am on a Mac running macOS Mojave. I run Iterm2 for terminal and fish version 3.0.0. I also use pipenv to manage my local development. I have this problem where when I activate a python virtual env, ...
Napoleon's user avatar
  • 123
2 votes
1 answer
925 views

Wrap command with options in fish function

Is there a way to wrap a command with options in a function, so that completions for that command with the options are shown? For example, I want to be able to do this: function remove --wraps='...
Eric Brandwein's user avatar
2 votes
2 answers
896 views

In fish shell, how to select with the cursor while shift is held?

In all gui text editing, ctrl-arrow moves the cursor by word, and holding shift selects as the cursor moves. Thus ctrl-shift-left selects the previous word. Fish already has the former but I want to ...
Sam S's user avatar
  • 23
2 votes
1 answer
634 views

Using Fish + NVM + Sublime results in commands not found

I'm using Fish shell/omf, NVM (https://github.com/derekstavis/plugin-nvm), and Sublime Text 3. I'm trying to use a build system to run nodemon (which I installed with npm -g install nodemon). nodemon ...
brandonscript's user avatar
2 votes
1 answer
738 views

Is administrator account necessary in order to use shells such as zsh and fish?

I have a weird situation. I’m using Mac OS X 10.11 (El Capitan) and iTerm2. Zsh is listed by default in /etc/shells as /bin/zsh, and this allows me to use Zsh without any issues on my standard ...
badfilms's user avatar
2 votes
1 answer
262 views

How to get fish-style formatting with less

Let's say I run a command like ls in fish and get lots of output, how do I scroll through it and still keep the fish formatting or something like it? ls | less doesn't keep the formatting. I know ...
qwertyuiop's user avatar
2 votes
0 answers
708 views

RVM is not a function message when using fish shell

I'm trying to use rvm from within the fish shell rvm gemset use rails3 I'm getting the following error message from fish RVM is not a function, selecting rubies with 'rvm use ...' will not work. ...
bigtunacan's user avatar
2 votes
0 answers
1k views

My custom fish shell prompt keeps resetting every reboot

I switched to fish shell a month ago and I'm quite pleased with it. But recently, my custom prompt keeps resetting to the default prompt every time I turn on my PC. When opening the terminal, I'm ...
Chnossos's user avatar
  • 121
1 vote
1 answer
2k views

Difference between set -g and set -x

I'm currently migrating from bash configs over to fish and got stuck translating my over bash exports. It seems there's three ways to do it in Fish that get the job done but I can't tell which one I ...
11th Hour Worker's user avatar
1 vote
3 answers
332 views

Can a fish script distinguish between being sourced and executed?

I have a fish script that exports some variables and launches a command at the end. I'd like to be able to source this file to bring these variables into the current shell session, but without ...
mkaito's user avatar
  • 2,072
1 vote
1 answer
397 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