Fix z, go to home without arg and remove non deleted folders
This commit is contained in:
parent
e7fa8113a6
commit
fb42de7375
@ -140,7 +140,11 @@ function __z -d "Jump to a recent directory."
|
|||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
set target (command awk -v t=(date +%s) -v typ="$typ" -v q="$q" -F "|" $z_script "$Z_DATA")
|
if set -q q[1]
|
||||||
|
set target (command awk -v t=(date +%s) -v typ="$typ" -v q="$q" -F "|" $z_script "$Z_DATA")
|
||||||
|
else
|
||||||
|
set target (path resolve $HOME)
|
||||||
|
end
|
||||||
|
|
||||||
if test "$status" -gt 0
|
if test "$status" -gt 0
|
||||||
return
|
return
|
||||||
@ -168,7 +172,11 @@ function __z -d "Jump to a recent directory."
|
|||||||
type -q open; and open "$target"; and return $status
|
type -q open; and open "$target"; and return $status
|
||||||
echo "Not sure how to open file manager"; and return 1
|
echo "Not sure how to open file manager"; and return 1
|
||||||
end
|
end
|
||||||
else
|
else if test -d $target
|
||||||
pushd "$target"
|
pushd "$target"
|
||||||
|
else
|
||||||
|
echo "Folder '$target' does not exist anymore, removing from z_data"
|
||||||
|
sed -i -e "\:^$target|.*:d" $Z_DATA
|
||||||
|
__z $argv
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user