From: NRK Date: Mon, 1 Nov 2021 08:05:18 +0000 (+0600) Subject: check if $entry is fullpath or not X-Git-Tag: v4.4~22^2~2 X-Git-Url: http://www.git.stargrave.org/?a=commitdiff_plain;h=afb7a6e9c1f7d595b8bbb020923999f5111a87cb;p=nnn.git check if $entry is fullpath or not --- diff --git a/plugins/fzopen b/plugins/fzopen index d26e96e3..013413fb 100755 --- 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="${2}/$entry" ;; + *) fullpath="$entry" ;; + esac if [ "-" = "$3" ]; then - printf "%s\n" "${2}/$entry" + printf "%s\n" "$fullpath" else - printf "%s\n" "${2}/$entry" > "$3" + printf "%s\n" "$fullpath" > "$3" fi # Tell `nnn` to clear its internal selection