From: Arun Prakash Jana Date: Sun, 14 Mar 2021 06:49:40 +0000 (+0530) Subject: Fix #876: fzcd - go to dir and select file X-Git-Tag: v3.6~6 X-Git-Url: http://www.git.stargrave.org/?a=commitdiff_plain;h=e8577baab2a407b7c56256025f48073d93e3e122;p=nnn.git Fix #876: fzcd - go to dir and select file --- diff --git a/plugins/fzcd b/plugins/fzcd index b3f5efff..a590d966 100755 --- a/plugins/fzcd +++ b/plugins/fzcd @@ -14,11 +14,9 @@ else fi if [ -n "$sel" ]; then - if ! [ -d "$sel" ]; then - sel=$(dirname "$sel") - elif [ "$sel" = "." ]; then + if [ "$sel" = "." ] || (! [ -d "$sel" ] && ! [ -f "$sel" ]); then exit 0 - fi + fi # Check if selected path returned # by fzf command is absolute