commit bcae254ff2612cbd72123f97593ae9d7b39e82cb
parent bdbd182c65cee58c2d09374a93a9ca3425e4ab7b
Author: Terminator X <engineerarun@gmail.com>
Date: Mon, 1 Nov 2021 13:53:48 +0530
Merge pull request #1215 from N-R-K/fzopen_fix
plugin: fzopen: print full path for picker mode
Diffstat:
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/plugins/fzopen b/plugins/fzopen
@@ -41,10 +41,14 @@ fi
# Check for picker mode
if [ "$3" ]; then
if [ "$entry" ]; then
+ case "$entry" in
+ /*) fullpath="$entry" ;;
+ *) fullpath="$PWD/$entry" ;;
+ esac
if [ "-" = "$3" ]; then
- printf "%s\n" "$entry"
+ printf "%s\n" "$fullpath"
else
- printf "%s\n" "$entry" > "$3"
+ printf "%s\n" "$fullpath" > "$3"
fi
# Tell `nnn` to clear its internal selection