externl / fish-symnav Goto Github PK
View Code? Open in Web Editor NEWSymbolic link navigation for Fish shell
License: MIT License
Symbolic link navigation for Fish shell
License: MIT License
root@test ~ cd
realpath: ‘’: No such file or directory
test: Missing argument at index 2
root@test ~ cd repo
cd: The directory “/repo” does not exist
just press enter without any command on prompt
root@test ~ ~/.config/fish/functions/__symdir_execute.fish (line 2): Array index out of bounds
set -l cmd (commandline --token)[1]
^
in function “__symdir_execute”
called on standard input
~/.config/fish/functions/__symdir_replace.fish (line 7): Array index out of bounds
for token in $tokens[2..-1]
^
in function “__symdir_replace”
called on line 1 of file -
from sourcing file -
called on line 60 of file /usr/share/fish/functions/eval.fish
in function “eval”
called on line 8 of file ~/.config/fish/functions/__symdir_execute.fish
in function “__symdir_execute”
called on standard input
commandline: Invalid combination of options,
insertion mode switches can not be used when not in insertion mode
~/.config/fish/functions/__symdir_replace.fish (line 19):
commandline --replace (string join ' ' -- $cmd)
^
in function “__symdir_replace”
called on line 1 of file -
from sourcing file -
called on line 60 of file /usr/share/fish/functions/eval.fish
in function “eval”
called on line 8 of file ~/.config/fish/functions/__symdir_execute.fish
in function “__symdir_execute”
called on standard input
commandline -- set or get the current command line buffer
Synopsis
commandline [OPTIONS] [CMD]
commandline: Type “help commandline” for related documentation
root@test ~ export
HOME /root
LC_ALL en_US.UTF-8
LC_CTYPE UTF-8
LOGNAME root
LSCOLORS dxgxbxdxcxegedabagacad
LS_COLORS 'rs=0:di=38;5;27:ln=38;5;51:mh=44;38;5;15:pi=40;38;5;11:so=38'…
MAIL /var/mail/root
PATH '/usr/local/sbin' '/usr/local/bin' '/usr/sbin' '/usr/bin' '/usr/bin'
PWD /root
SHELL /usr/bin/fish
SHLVL 1
SSH_CLIENT '172.17.0.1 45648 20022'
SSH_CONNECTION '172.17.0.1 45648 172.17.0.2 20022'
SSH_TTY /dev/pts/5
TERM xterm-256color
USER root
fisher_cmd_name fisher
Hello! Thanks for maintaining fish-symnav! It makes working with mc and fish much better!
The expected behaviour of cd -
, according to the documentation, is going back one directory:
$ cd /; and pwd
/
$ cd -; and pwd
/home/teresaejunior
But after installing externl/fish-symnav
:
$ cd /; and pwd
/
$ cd -; and pwd
cd: The directory “//-” doesn't exist
can't even exit
after uninstall synnav, have to force close the ssh session.
Hello.
I've been using this tool for the past hour or so, and I'm pretty sure I found a bug when using cd ..
Expected behavior:
cd ~
cd ..
cd ..
Should result in the user being in the root directory.
Actual behavior:
cd ~
cd ..
cd ..
cd: Unknown error trying to locate directory ""
Results in the user remaining in /home
. Once a user has run cd /
, however, they can use cd ..
to navigate back to the root directory (Unless they run cd $HOME
or cd ~
after).
Additionally, once navigating to another directory after using cd /
, the path always has a leading slash (e.g. //home
)
Edit: running cd ..
when in the root directory also results in the title's error message
if the home folder itself is a symbolic link, when first login (prompt_pwd) won't shows the link.
any work around for it? add a "cd" on config.fish won't help.
also if i do a cd after login, (prompt_pwd) won't recognize the home folder as ~/ but shows the actually symbolic link path of home folder.
if i do multiple "cd .", the prompt_pwd will become ~/./././././.
should ignore
cd .
cd ./.
cd ././
or etc
When I step into a symlink
~/Apps -> /mnt/data/Apps
cd Apps
It shows me the prompt as
/mnt/data/Apps ~>
Furthermore, when I do cd .., it goes back to
/mnt/data ~>
What are the setting required so that cd Apps shows me ~/Apps ~>
and cd .. will take me back to ~
if i am inside any symbolic linked path, the prompt do shows the symbolic link. however once i run 'screen' the prompt will be translated to full path.
fisher is now at version 3 with breaking changes.
linking ~/.config/fish/functions/__symnav_complete.fish
linking ~/.config/fish/functions/__symnav_execute.fish
linking ~/.config/fish/functions/__symnav_get_substitution.fish
linking ~/.config/fish/functions/__symnav_is_absolute.fish
linking ~/.config/fish/functions/__symnav_is_pwd.fish
linking ~/.config/fish/functions/__symnav_is_realpath.fish
linking ~/.config/fish/functions/__symnav_join_path.fish
linking ~/.config/fish/functions/__symnav_msg.fish
linking ~/.config/fish/functions/__symnav_parse_commandline.fish
linking ~/.config/fish/functions/__symnav_relative_to.fish
linking ~/.config/fish/functions/__symnav_replace_current_token.fish
linking ~/.config/fish/functions/__symnav_resolve_to.fish
linking ~/.config/fish/functions/__symnav_shadow_cd.fish
linking ~/.config/fish/functions/__symnav_shadow_pwd.fish
linking ~/.config/fish/functions/__symnav_split_path.fish
linking ~/.config/fish/functions/__symnav_string_match_flag.fish
linking ~/.config/fish/functions/__symnav_trim_trailing_slash.fish
linking ~/.config/fish/functions/__symnav_validate_substitution_mode.fish
linking ~/.config/fish/conf.d/symnav_initialize.fish
linking ~/.config/fish/conf.d/fish-symnav_key_bindings.fish
~ took 8s 312ms
➜ test: Missing argument at index 2
[symnav] completion bindings may not be installed
➜ test: Missing argument at index 2
[symnav] completion bindings may not be installed
functions: Function '__symnav_fish_cd' already exists. Cannot create copy 'cd'
~/.config/fish/conf.d/symnav_initialize.fish (line 38):
functions --copy $function_name $fish_function
^
in function '__symnav_initialize'
called on line 7 of file ~/.config/fish/functions/__symnav_execute.fish
in function '__symnav_execute'
called on standard input
functionsfunctions - print or erase functions
-
Synopsis
functions [ -a | --all ] [ -n | --names ]
functions [ -D | --details ] [ -v ] FUNCTION
functions -c OLDNAME NEWNAME
functions -d DESCRIPTION FUNCTION
functions [ -e | -q ] FUNCTIONS...
functions: Type 'help functions' for related documentation
functions: Function '__symnav_fish_fish_prompt' already exists. Cannot create copy 'fish_prompt'
~/.config/fish/conf.d/symnav_initialize.fish (line 38):
functions --copy $function_name $fish_function
^
in function '__symnav_initialize'
called on line 7 of file ~/.config/fish/functions/__symnav_execute.fish
in function '__symnav_execute'
called on standard input
functionsfunctions - print or erase functions
-
Synopsis
functions [ -a | --all ] [ -n | --names ]
functions [ -D | --details ] [ -v ] FUNCTION
functions -c OLDNAME NEWNAME
functions -d DESCRIPTION FUNCTION
functions [ -e | -q ] FUNCTIONS...
functions: Type 'help functions' for related documentation
functions: Function '__symnav_fish_prompt_pwd' already exists. Cannot create copy 'prompt_pwd'
~/.config/fish/conf.d/symnav_initialize.fish (line 38):
functions --copy $function_name $fish_function
^
in function '__symnav_initialize'
called on line 7 of file ~/.config/fish/functions/__symnav_execute.fish
in function '__symnav_execute'
called on standard input
functionsfunctions - print or erase functions
-
Synopsis
functions [ -a | --all ] [ -n | --names ]
functions [ -D | --details ] [ -v ] FUNCTION
functions -c OLDNAME NEWNAME
functions -d DESCRIPTION FUNCTION
functions [ -e | -q ] FUNCTIONS...
functions: Type 'help functions' for related documentation
functions: Function '__symnav_fish_prompt_pwd' already exists. Cannot create copy 'prompt_pwd'
~/.config/fish/conf.d/symnav_initialize.fish (line 73):
functions --copy $func __symnav_fish_$func
^
in function '__symnav_modify_function'
called on line 58 of file ~/.config/fish/conf.d/symnav_initialize.fish
with parameter list 'prompt_pwd'
in function '__symnav_initialize'
called on line 7 of file ~/.config/fish/functions/__symnav_execute.fish
in function '__symnav_execute'
called on standard input
functionsfunctions - print or erase functions
-
Synopsis
functions [ -a | --all ] [ -n | --names ]
functions [ -D | --details ] [ -v ] FUNCTION
functions -c OLDNAME NEWNAME
functions -d DESCRIPTION FUNCTION
functions [ -e | -q ] FUNCTIONS...
functions: Type 'help functions' for related documentation
functions: Function '__symnav_shadow_prompt_pwd' already exists. Cannot create copy 'prompt_pwd'
~/.config/fish/conf.d/symnav_initialize.fish (line 81):
functions --copy $func __symnav_shadow_$func
^
in function '__symnav_modify_function'
called on line 58 of file ~/.config/fish/conf.d/symnav_initialize.fish
with parameter list 'prompt_pwd'
in function '__symnav_initialize'
called on line 7 of file ~/.config/fish/functions/__symnav_execute.fish
in function '__symnav_execute'
called on standard input
functionsfunctions - print or erase functions
-
Synopsis
functions [ -a | --all ] [ -n | --names ]
functions [ -D | --details ] [ -v ] FUNCTION
functions -c OLDNAME NEWNAME
functions -d DESCRIPTION FUNCTION
functions [ -e | -q ] FUNCTIONS...
functions: Type 'help functions' for related documentation
functions: Function '__symnav_fish_fish_prompt' already exists. Cannot create copy 'fish_prompt'
~/.config/fish/conf.d/symnav_initialize.fish (line 73):
functions --copy $func __symnav_fish_$func
^
in function '__symnav_modify_function'
called on line 58 of file ~/.config/fish/conf.d/symnav_initialize.fish
with parameter list 'fish_prompt'
in function '__symnav_initialize'
called on line 7 of file ~/.config/fish/functions/__symnav_execute.fish
in function '__symnav_execute'
called on standard input
functionsfunctions - print or erase functions
-
Synopsis
functions [ -a | --all ] [ -n | --names ]
functions [ -D | --details ] [ -v ] FUNCTION
functions -c OLDNAME NEWNAME
functions -d DESCRIPTION FUNCTION
functions [ -e | -q ] FUNCTIONS...
functions: Type 'help functions' for related documentation
functions: Function '__symnav_shadow_fish_prompt' already exists. Cannot create copy 'fish_prompt'
~/.config/fish/conf.d/symnav_initialize.fish (line 81):
functions --copy $func __symnav_shadow_$func
^
in function '__symnav_modify_function'
called on line 58 of file ~/.config/fish/conf.d/symnav_initialize.fish
with parameter list 'fish_prompt'
in function '__symnav_initialize'
called on line 7 of file ~/.config/fish/functions/__symnav_execute.fish
in function '__symnav_execute'
called on standard input
functionsfunctions - print or erase functions
-
Synopsis
functions [ -a | --all ] [ -n | --names ]
functions [ -D | --details ] [ -v ] FUNCTION
functions -c OLDNAME NEWNAME
functions -d DESCRIPTION FUNCTION
functions [ -e | -q ] FUNCTIONS...
functions: Type 'help functions' for related documentation
error as follow, and everything works fine the first enter.
Welcome to fish, the friendly interactive shell
root@cms1 ~ functions: Function “fish_title” does not exist
Standard input (line 29):
in function “__symnav_fix_function”
called on line 51 of file ~/.config/fish/functions/__symnav_initialize.fish
with parameter list “fish_title”
in function “__symnav_initialize”
called on line 7 of file ~/.config/fish/functions/__symnav_execute.fish
in function “__symnav_execute”
called on standard input
functions -- print or erase functions
Synopsis
functions [ -a | --all ] [ -n | --names ]
functions [ -D | --details ] [ -v ] FUNCTION
functions -c OLDNAME NEWNAME
functions -d DESCRIPTION FUNCTION
functions [ -e | -q ] FUNCTIONS...
functions: Type “help functions” for related documentation
functions: Function “fish_title” does not exist
Standard input (line 37):
functions --copy $func __symnav_shadow_$func
^
in function “__symnav_fix_function”
called on line 51 of file ~/.config/fish/functions/__symnav_initialize.fish
with parameter list “fish_title”
in function “__symnav_initialize”
called on line 7 of file ~/.config/fish/functions/__symnav_execute.fish
in function “__symnav_execute”
called on standard input
functions -- print or erase functions
Synopsis
functions [ -a | --all ] [ -n | --names ]
functions [ -D | --details ] [ -v ] FUNCTION
functions -c OLDNAME NEWNAME
functions -d DESCRIPTION FUNCTION
functions [ -e | -q ] FUNCTIONS...
functions: Type “help functions” for related documentation
functions: Function “__parse_current_folder” does not exist
Standard input (line 29):
in function “__symnav_fix_function”
called on line 51 of file ~/.config/fish/functions/__symnav_initialize.fish
with parameter list “__parse_current_folder”
in function “__symnav_initialize”
called on line 7 of file ~/.config/fish/functions/__symnav_execute.fish
in function “__symnav_execute”
called on standard input
functions -- print or erase functions
Synopsis
functions [ -a | --all ] [ -n | --names ]
functions [ -D | --details ] [ -v ] FUNCTION
functions -c OLDNAME NEWNAME
functions -d DESCRIPTION FUNCTION
functions [ -e | -q ] FUNCTIONS...
functions: Type “help functions” for related documentation
functions: Function “__parse_current_folder” does not exist
Standard input (line 37):
functions --copy $func __symnav_shadow_$func
^
in function “__symnav_fix_function”
called on line 51 of file ~/.config/fish/functions/__symnav_initialize.fish
with parameter list “__parse_current_folder”
in function “__symnav_initialize”
called on line 7 of file ~/.config/fish/functions/__symnav_execute.fish
in function “__symnav_execute”
called on standard input
functions -- print or erase functions
Synopsis
functions [ -a | --all ] [ -n | --names ]
functions [ -D | --details ] [ -v ] FUNCTION
functions -c OLDNAME NEWNAME
functions -d DESCRIPTION FUNCTION
functions [ -e | -q ] FUNCTIONS...
functions: Type “help functions” for related documentation
Try the following:
mkdir -p x/y
ln -s x/y z
bash # or sh
cd z
fish
You'll see now the current directory in the prompt is shown as x/y
where it should be z
. I don't find this to be a huge inconvenience, but I thought I'd report it in case you're interested.
Regardless, I really appreciate this plugin, thanks.
Like this:
/n/v/n/p/p/root # cd /nix/var/nix/profiles/per-user/root/channels
/n/s/73k1g483ls1bax9y5ij9bl71wl52s1zk-user-environment # pwd
/nix/var/nix/profiles/per-user/root/channels
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.