mirror of
https://github.com/wting/autojump
synced 2024-10-27 20:34:07 +00:00
If autojump can't find the directory, attempt a cd
This commit is contained in:
parent
f09d23e30d
commit
55f4eacc8a
@ -49,15 +49,20 @@ function j
|
|||||||
autojump $argv
|
autojump $argv
|
||||||
case '*'
|
case '*'
|
||||||
set -l output (autojump $argv)
|
set -l output (autojump $argv)
|
||||||
if test -d "$output"
|
# Check for . and attempt a regular cd
|
||||||
set_color red
|
if [ $output = "." ]
|
||||||
echo $output
|
cd $argv
|
||||||
set_color normal
|
|
||||||
cd $output
|
|
||||||
else
|
else
|
||||||
__aj_err "autojump: directory '"$argv"' not found"
|
if test -d "$output"
|
||||||
__aj_err "\n$output\n"
|
set_color red
|
||||||
__aj_err "Try `autojump --help` for more information."
|
echo $output
|
||||||
|
set_color normal
|
||||||
|
cd $output
|
||||||
|
else
|
||||||
|
__aj_err "autojump: directory '"$argv"' not found"
|
||||||
|
__aj_err "\n$output\n"
|
||||||
|
__aj_err "Try `autojump --help` for more information."
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user