mirror of
https://github.com/jarun/nnn.git
synced 2024-11-19 17:39:14 +00:00
check if $entry is fullpath or not
This commit is contained in:
parent
a47376ee04
commit
afb7a6e9c1
|
@ -41,10 +41,14 @@ fi
|
||||||
# Check for picker mode
|
# Check for picker mode
|
||||||
if [ "$3" ]; then
|
if [ "$3" ]; then
|
||||||
if [ "$entry" ]; then
|
if [ "$entry" ]; then
|
||||||
|
case "$entry" in
|
||||||
|
/*) fullpath="${2}/$entry" ;;
|
||||||
|
*) fullpath="$entry" ;;
|
||||||
|
esac
|
||||||
if [ "-" = "$3" ]; then
|
if [ "-" = "$3" ]; then
|
||||||
printf "%s\n" "${2}/$entry"
|
printf "%s\n" "$fullpath"
|
||||||
else
|
else
|
||||||
printf "%s\n" "${2}/$entry" > "$3"
|
printf "%s\n" "$fullpath" > "$3"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Tell `nnn` to clear its internal selection
|
# Tell `nnn` to clear its internal selection
|
||||||
|
|
Loading…
Reference in a new issue