Fix #876: fzcd - go to dir and select file

This commit is contained in:
Arun Prakash Jana 2021-03-14 12:19:40 +05:30
parent 1571ea2b35
commit e8577baab2
No known key found for this signature in database
GPG Key ID: A75979F35C080412
1 changed files with 2 additions and 4 deletions

View File

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