fish-shell | The user-friendly command line shell | Command Line Interface library
kandi X-RAY | fish-shell Summary
kandi X-RAY | fish-shell Summary
The user-friendly command line shell.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of fish-shell
fish-shell Key Features
fish-shell Examples and Code Snippets
Community Discussions
Trending Discussions on fish-shell
QUESTION
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.
ANSWER
Answered 2021-Sep-02 at 03:57Your terminal app is forbidden from accessing the Downloads directory. You can fix it like so:
- Open Security and Privacy preference pane
- Click on the Privacy tab
- Select "Files and Folders" in the side bar
- 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.
QUESTION
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:
...ANSWER
Answered 2021-Jan-30 at 13:52fish 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.
QUESTION
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:
...ANSWER
Answered 2020-Dec-07 at 18:26function 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}" \
--preview-window="70%:wrap"
) &&
open "$file"
end
QUESTION
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
:
ANSWER
Answered 2020-Jul-30 at 07:52Apparently 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.
QUESTION
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?
EDIT:
I've tested this code from @MehdiBelbal solution:
...ANSWER
Answered 2020-Jul-23 at 09:27If you mean the console, i can suggest the extension Chalk. Example using chalk:
QUESTION
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:
...ANSWER
Answered 2020-May-11 at 08:01Your 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:
QUESTION
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.
ANSWER
Answered 2020-Mar-07 at 10:23I'm customising the title shows in the terminal windows by defining the fish_terminal function.
You mean the fish_title function.
QUESTION
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:
...ANSWER
Answered 2020-Jan-28 at 17:36However, 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.
QUESTION
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/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.
...ANSWER
Answered 2020-Jan-02 at 17:36You 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
Vulnerabilities
No vulnerabilities reported
Install fish-shell
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page