Skip to content

Commit

Permalink
Merge pull request jarun#1215 from N-R-K/fzopen_fix
Browse files Browse the repository at this point in the history
plugin: fzopen: print full path for picker mode
  • Loading branch information
jarun authored Nov 1, 2021
2 parents bdbd182 + 65ae3ab commit bcae254
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions plugins/fzopen
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit bcae254

Please sign in to comment.