-
-
Notifications
You must be signed in to change notification settings - Fork 24
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
Error when using fzopen after changing directory #133
Comments
@mcchrish can you please take a look at it? Are you waiting for someone to pitch in? |
@jarun I'm waiting for anyone to take a look. |
In that case please respond to the defect with a note so someone else bothers to look into it. |
This is probably a problem with # Check for picker mode
if [ "$3" ]; then
if [ "$entry" ]; then
if [ "-" = "$3" ]; then
printf "%s\n" "$entry"
else
printf "%s\n" "$entry" > "$3"
fi
# Tell `nnn` to clear its internal selection
printf "%s" "0p" > "$NNN_PIPE"
fi
exit 0
fi |
Added the "help wanted" label so anyone who's interested can take a look. |
@N-R-K fzopen is working as expected in this block. This is a case of calling a picker plugin while So, if user is picking files using |
@mizlan can you please have a look? |
Can reproduce this with a dummy plugin with that block.
#!/bin/sh
# Check for picker mode
entry="$1"
if [ "$3" ]; then
if [ "$entry" ]; then
if [ "-" = "$3" ]; then
printf "%s\n" "$entry"
else
printf "%s\n" "$entry" > "$3"
fi
# Tell `nnn` to clear its internal selection
printf "%s" "0p" > "$NNN_PIPE"
fi
exit 0
fi |
In explorer mode, it just opens the plugin file. |
That's with pick a plugin method... and expected as per current code. |
Okay, I know what's going on. The plugin is printing only filename, not full path. So if you change directory it becomes a problem. |
OK. I fixed the other issue with opening the plugin (instead of run) at jarun/nnn@bdbd182. |
@ram02z the fzopen plugin is fixed. Please confirm if the patch works for you. |
To Reproduce
NNNPicker
fzopen
and pick a fileScreenshots
Environment:
Additional context
The error doesn't occur for me if I don't change the directory that nnn.vim was invoked from.
nnn.vim config: https://github.com/ram02z/dotfiles/blob/6ee4aa967a18643a657f7d30cf4435fccb265f05/dot_config/nvim/plugin/50-plugins.lua#L321-L350
The text was updated successfully, but these errors were encountered: