Merge pull request #1215 from N-R-K/fzopen_fix

plugin: fzopen: print full path for picker mode
This commit is contained in:
Terminator X 2021-11-01 13:53:48 +05:30 committed by GitHub
commit bcae254ff2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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