Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Getting error after last update #200

Closed
augustocdias opened this issue Apr 3, 2023 · 8 comments
Closed

Getting error after last update #200

augustocdias opened this issue Apr 3, 2023 · 8 comments
Labels
area/fish Catch all for changes in fish files kind/bug A bug; unintended behavior

Comments

@augustocdias
Copy link
Contributor

I use jethrokuan/z to also help nagigate between folders. When I call z, it triggers enhancd and when I select a folder I'm getting the following error:

 ~  z mls                                                                                                                                                                                                                                 I
test: Missing argument at index 3
= true
       ^
~/.config/fish/functions/_enhancd_filter_interactive.fish (line 16):
    if test $ENHANCD_USE_ABBREV = true
       ^
in function '_enhancd_filter_interactive'
        called on line 1 of file ~/.config/fish/functions/enhancd.fish
in command substitution
        called on line 78 of file ~/.config/fish/functions/enhancd.fish
in function 'enhancd' with arguments '/Users/augusto/projects/openmls/openmls'
        called on line 3 of file ~/.config/fish/conf.d/enhancd.fish
in function 'cd' with arguments '/Users/augusto/projects/openmls/openmls'
        called on line 80 of file /opt/homebrew/Cellar/fish/3.6.1/share/fish/functions/pushd.fish
in function 'pushd' with arguments '/Users/augusto/projects/openmls/openmls'
        called on line 172 of file ~/.config/fish/functions/__z.fish
in function '__z' with arguments 'mls'
        called on line 25 of file ~/.config/fish/conf.d/z.fish
in function 'z' with arguments 'mls'
~/.config/fish/functions/_enhancd_filepath_walk.fish (line 1): Unknown command. '/Users/augusto/projects/openmls/openmls' exists but is not an executable file.
in command substitution
        called on line 2 of file ~/.config/fish/functions/_enhancd_filepath_walk.fish
in function '_enhancd_filepath_walk'
in function 'sub'
        called on line 7 of file ~/.config/fish/functions/_enhancd_history_update.fish
in function '_enhancd_history_update'
        called on line 1 of file ~/.config/fish/functions/_enhancd_cd_after.fish
in command substitution
        called on line 5 of file ~/.config/fish/functions/_enhancd_cd_after.fish
in function '_enhancd_cd_after'
        called on line 12 of file ~/.config/fish/functions/_enhancd_cd_builtin.fish
in function '_enhancd_cd_builtin' with arguments '/Users/augusto/projects/openmls/openmls'
        called on line 92 of file ~/.config/fish/functions/enhancd.fish
in function 'enhancd' with arguments '/Users/augusto/projects/openmls/openmls'
        called on line 3 of file ~/.config/fish/conf.d/enhancd.fish
in function 'cd' with arguments '/Users/augusto/projects/openmls/openmls'
        called on line 80 of file /opt/homebrew/Cellar/fish/3.6.1/share/fish/functions/pushd.fish
in function 'pushd' with arguments '/Users/augusto/projects/openmls/openmls'
        called on line 172 of file ~/.config/fish/functions/__z.fish
in function '__z' with arguments 'mls'
        called on line 25 of file ~/.config/fish/conf.d/z.fish
in function 'z' with arguments 'mls'
~/.config/fish/functions/_enhancd_filepath_walk.fish (line 2): Command not executable
    set -a dirs ($PWD _enhancd_filepath_get_parent_dirs)
                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
in function '_enhancd_filepath_walk'
in function 'sub'
        called on line 7 of file ~/.config/fish/functions/_enhancd_history_update.fish
in function '_enhancd_history_update'
        called on line 1 of file ~/.config/fish/functions/_enhancd_cd_after.fish
in command substitution
        called on line 5 of file ~/.config/fish/functions/_enhancd_cd_after.fish
in function '_enhancd_cd_after'
        called on line 12 of file ~/.config/fish/functions/_enhancd_cd_builtin.fish
in function '_enhancd_cd_builtin' with arguments '/Users/augusto/projects/openmls/openmls'
        called on line 92 of file ~/.config/fish/functions/enhancd.fish
in function 'enhancd' with arguments '/Users/augusto/projects/openmls/openmls'
        called on line 3 of file ~/.config/fish/conf.d/enhancd.fish
in function 'cd' with arguments '/Users/augusto/projects/openmls/openmls'
        called on line 80 of file /opt/homebrew/Cellar/fish/3.6.1/share/fish/functions/pushd.fish
in function 'pushd' with arguments '/Users/augusto/projects/openmls/openmls'
        called on line 172 of file ~/.config/fish/functions/__z.fish
in function '__z' with arguments 'mls'
        called on line 25 of file ~/.config/fish/conf.d/z.fish

Calling cd . or cd .. later for example causes further errors:

cd .                                                                                                                                                                                                I
~/.config/fish/functions/_enhancd_filepath_walk.fish (line 1): Unknown command. '/Users/augusto/projects/openmls/openmls' exists but is not an executable file.
in command substitution
        called on line 2 of file ~/.config/fish/functions/_enhancd_filepath_walk.fish
in function '_enhancd_filepath_walk'
in function 'sub'
        called on line 7 of file ~/.config/fish/functions/_enhancd_history_update.fish
in function '_enhancd_history_update'
        called on line 1 of file ~/.config/fish/functions/_enhancd_cd_after.fish
in command substitution
        called on line 5 of file ~/.config/fish/functions/_enhancd_cd_after.fish
in function '_enhancd_cd_after'
        called on line 12 of file ~/.config/fish/functions/_enhancd_cd_builtin.fish
in function '_enhancd_cd_builtin' with arguments '.'
        called on line 92 of file ~/.config/fish/functions/enhancd.fish
in function 'enhancd' with arguments '.'
        called on line 3 of file ~/.config/fish/conf.d/enhancd.fish
in function 'cd' with arguments '.'
~/.config/fish/functions/_enhancd_filepath_walk.fish (line 2): Command not executable
    set -a dirs ($PWD _enhancd_filepath_get_parent_dirs)
                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
in function '_enhancd_filepath_walk'
in function 'sub'
        called on line 7 of file ~/.config/fish/functions/_enhancd_history_update.fish
in function '_enhancd_history_update'
        called on line 1 of file ~/.config/fish/functions/_enhancd_cd_after.fish
in command substitution
        called on line 5 of file ~/.config/fish/functions/_enhancd_cd_after.fish
in function '_enhancd_cd_after'
        called on line 12 of file ~/.config/fish/functions/_enhancd_cd_builtin.fish
in function '_enhancd_cd_builtin' with arguments '.'
        called on line 92 of file ~/.config/fish/functions/enhancd.fish
in function 'enhancd' with arguments '.'
        called on line 3 of file ~/.config/fish/conf.d/enhancd.fish
in function 'cd' with arguments '.'

I'm running on fish and wez term.

@babarot
Copy link
Owner

babarot commented Apr 3, 2023

Thank you for the report. Did you restart shell?

@augustocdias
Copy link
Contributor Author

augustocdias commented Apr 3, 2023

Yes. The issue also happens in iTerm2

@martonperei
Copy link

martonperei commented Apr 3, 2023

Got the same error after updating. Fish shell 3.6.1, Mac OS, iterm2.
Seems like some easy fixes.

if test $ENHANCD_USE_ABBREV = true should be if test "$ENHANCD_USE_ABBREV" = true
set -a dirs ($PWD _enhancd_filepath_get_parent_dirs) should be set -a dirs $PWD (_enhancd_filepath_get_parent_dirs)

@babarot babarot added kind/bug A bug; unintended behavior area/fish Catch all for changes in fish files labels Apr 3, 2023
@babarot
Copy link
Owner

babarot commented Apr 3, 2023

@martonperei Thank you for the debug.

@augustocdias Could you test on this branch? https://github.com/b4b4r07/enhancd/tree/babarot/fix-fish

@peeviddy
Copy link
Contributor

peeviddy commented Apr 7, 2023

@augustocdias try mine too

@babarot
Copy link
Owner

babarot commented Apr 7, 2023

Thank you for the contribution! @peeviddy

I'm gonna merge your patch soon after checking it works fine.

@augustocdias
Copy link
Contributor Author

augustocdias commented Apr 11, 2023

The branches are working fine

@babarot
Copy link
Owner

babarot commented Apr 11, 2023

Thank you for the checking!

I've merged @peeviddy 's PR and released new version. Thank you all

@babarot babarot closed this as completed Apr 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/fish Catch all for changes in fish files kind/bug A bug; unintended behavior
Projects
None yet
Development

No branches or pull requests

4 participants