fish-shell | The user-friendly command line shell | Command Line Interface library

 by   fish-shell C++ Version: 3.6.1 License: Non-SPDX

kandi X-RAY | fish-shell Summary

kandi X-RAY | fish-shell Summary

fish-shell is a C++ library typically used in Utilities, Command Line Interface applications. fish-shell has no bugs, it has no vulnerabilities and it has medium support. However fish-shell has a Non-SPDX License. You can download it from GitHub.

The user-friendly command line shell.

            kandi-support Support

              fish-shell has a medium active ecosystem.
              It has 21670 star(s) with 1714 fork(s). There are 283 watchers for this library.
              There were 2 major release(s) in the last 12 months.
              There are 450 open issues and 6294 have been closed. On average issues are closed in 219 days. There are 10 open pull requests and 0 closed requests.
              It has a neutral sentiment in the developer community.
              The latest version of fish-shell is 3.6.1

            kandi-Quality Quality

              fish-shell has 0 bugs and 0 code smells.

            kandi-Security Security

              fish-shell has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
              fish-shell code analysis shows 0 unresolved vulnerabilities.
              There are 0 security hotspots that need review.

            kandi-License License

              fish-shell has a Non-SPDX License.
              Non-SPDX licenses can be open source with a non SPDX compliant license, or non open source licenses, and you need to review them closely before use.

            kandi-Reuse Reuse

              fish-shell releases are available to install and integrate.
              It has 6876 lines of code, 230 functions and 58 files.
              It has high code complexity. Code complexity directly impacts maintainability of the code.

            Top functions reviewed by kandi - BETA

            kandi's functional review helps you automatically verify the functionalities of the libraries and avoid rework.
            Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of fish-shell
            Get all kandi verified functions for this library.

            fish-shell Key Features

            No Key Features are available at this moment for fish-shell.

            fish-shell Examples and Code Snippets

            No Code Snippets are available at this moment for fish-shell.

            Community Discussions


            Getting an error "cd: '/Users/x/Downloads/' is a rotten symlink" in Fish shell
            Asked 2021-Sep-02 at 03:57

            Today I logged onto my machine and tried to cd ~/Downloads, but my shell (Fish) just returns the error cd: '/Users/x/Downloads/' is a rotten symlink without any further information.

            It seems to originate from Fish's builtin_cd function call here, however I can't tell what the reason is since my Downloads directory is not symlinked.

            I'm able to cd into any other directory just fine and I'm able to access Downloads through MacOS's UI (Finder) so I don't think the directory data has been corrupted.

            Does anyone know what the cause of this error could be and/or how to fix it?

            edit: I've already tried reinstalling Fish from my package manager (homebrew), to no avail.



            Answered 2021-Sep-02 at 03:57

            Your terminal app is forbidden from accessing the Downloads directory. You can fix it like so:

            1. Open Security and Privacy preference pane
            2. Click on the Privacy tab
            3. Select "Files and Folders" in the side bar
            4. Find your terminal app, and ensure that the Downloads directory is checked for it

            You'll have to relaunch the terminal before it can get access.



            Completion for filenames without root, only extension (hidden files)
            Asked 2021-Jan-31 at 05:22

            I'm trying to write a completion for a command that takes filenames that have no root/base part, only extension (such as "foo/.ext"). Hidden files. (Specifically, ".envrc" for direnv.)

            There are several examples to follow in fish's installation that use __fish_complete_suffix for files that have a root and extension, such as fish itself:



            Answered 2021-Jan-30 at 13:52

            fish doesn't add hidden files to the list of completions unless the token being completed already starts with a '.'.

            You should be able to write a custom completion that does what you want, but unfortunately a long-standing bug makes that impossible.



            Converting bash to fish function (use rga-fzf in fish)
            Asked 2020-Dec-07 at 18:26

            I am trying to convert this bash/zsh function into fish. I want to use rga-fzf which is a function for zsh/bash using fzf together with ripgrep-all.

            (my default shell is fish)

            Here's the zsh/fish function:



            Answered 2020-Dec-07 at 18:26
            function fif
                set -x RG_PREFIX rga --files-with-matches
                set -l file
                set file (
                    FZF_DEFAULT_COMMAND="$RG_PREFIX '$argv'" \
                        fzf --sort --preview="[ ! -z {} ] && rga --pretty --context 5 {q} {}" \
                            --phony -q "$argv" \
                            --bind "change:reload:$RG_PREFIX {q}" \
                ) &&
                open "$file"



            Snakemake change conda activation command to 'conda activate'
            Asked 2020-Jul-30 at 07:52

            I want to use snakemake with fish shell and conda environments in my managed environment (basically I have no root rights and the default shell cannot be changed).

            I set up fish as the 'default' shell using this hack inside the .bashrc:



            Answered 2020-Jul-30 at 07:52

            Apparently this was a bug in an older version of snakemake. The effects described in the question were produced with snakemake 4.3.1.

            Running snakemake from within a conda environment where snakemake 5.17.0 is installed works perfectly fine with the setup as described in the question. No --overwrite-shellcmd or other changes are required.



            How to have syntax highlighting of input text in Node.js REPL?
            Asked 2020-Jul-23 at 12:00

            This is possible in Linux terminal because there is shell like fish that use different highlighting for input text. Is it possible to have something like this in Node.js. Or do I need to reimplement readLine library with this feature.

            Does anyone know how to do this in Node.js? I was checking the code for fish on GitHub and it seems that the project use NCurses. Can I do the same in Node.js to have REPL where input text is in color?


            I've tested this code from @MehdiBelbal solution:



            Answered 2020-Jul-23 at 09:27

            If you mean the console, i can suggest the extension Chalk. Example using chalk:



            Remove Fish shell error message in greetings
            Asked 2020-May-11 at 08:02

            I wanted to remove Fish shell greetings. As I was searching for the solution, I went to this StackOverflow question saw a technique where I can minimize default welcome script to the new one. And I did this on my terminal:



            Answered 2020-May-11 at 08:01

            Your fish_greeting function tries to execute a command named "StackOverflow" that doesn't exist. The original answer suggested using the "fortune" command, which is an actual thing you might have installed.

            If you have both a function and a variable named "fish_greeting", the function takes precedence, so the solution is to fix the function. Use a command that exists, or none at all:



            Why argv[-1] shows the manual title in fish_title?
            Asked 2020-Mar-07 at 11:23

            I'm customising the title shows in the terminal windows by defining the fish_title function. I want to show X after I execute man X and I thought eval $argv[-1] would give me that, but it gives me the man title itself (e.g. FISH(1) fish-shell). Why?

            I'm getting the actual argument with (string split " " $argv)[-1], but I would like to know why the former attempt gives me that unexpected result.



            Answered 2020-Mar-07 at 10:23

            I'm customising the title shows in the terminal windows by defining the fish_terminal function.

            You mean the fish_title function.



            Fish-shell throws error on startup. Wrong number of arguments
            Asked 2020-Jan-30 at 04:01

            I have been using fish-shell on a mac for a few months with no issues. All of a sudden, when I open the terminal I get the following error message:



            Answered 2020-Jan-28 at 17:36

            However, it appears that there is 1 argument even though it says there is 0.

            Well, not really.

            The 1 argument it wants is after expansion. In this case it runs uname, and uses its output as the argument to switch.

            You appear to have changed something about your system so that uname doesn't print anything anymore - perhaps you added a function called uname, or you changed $PATH so that uname isn't included anymore.



            fish shell login commands keep running on screen or tmux session after login
            Asked 2020-Jan-02 at 17:36

            I've just switched to fish-shell

            And I've used the instructions of How do I run a command every login? What's fish's equivalent to .bashrc?

            Which means I've moved the commands which i prefer to run upon login from .bashrc to ~/.config/fish/

            But right now the commands keep running if i open screen or tmux session ! but before while i were using the default shell that's was never happens (meant that the commands were only run during the login and never re-run in screen session)

            How to avoid this?

            Thanks in advance.



            Answered 2020-Jan-02 at 17:36

            You can test for the TERM environmental variable to see if your shell is running in such a session. Both screen and tmux by default set it to 'screen'.


            Community Discussions, Code Snippets contain sources that include Stack Exchange Network


            No vulnerabilities reported

            Install fish-shell

            You can download it from GitHub.


            For any new features, suggestions and bugs create an issue on GitHub. If you have any questions check and ask questions on community page Stack Overflow .
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries