mirror of
https://github.com/wting/autojump
synced 2024-10-27 20:34:07 +00:00
Merge pull request #183 from jsliang/master
Handle autojump errors when opening file manager. Closes #177.
This commit is contained in:
commit
70aad547b8
@ -98,20 +98,26 @@ function jc {
|
||||
}
|
||||
|
||||
function jo {
|
||||
case ${OSTYPE} in
|
||||
linux-gnu)
|
||||
xdg-open "$(autojump $@)"
|
||||
;;
|
||||
darwin*)
|
||||
open "$(autojump $@)"
|
||||
;;
|
||||
cygwin)
|
||||
cmd /C start "" $(cygpath -w -a $(pwd))
|
||||
;;
|
||||
*)
|
||||
echo "Unknown operating system." 1>&2
|
||||
;;
|
||||
esac
|
||||
if [ -z $(autojump $@) ]; then
|
||||
echo "autojump: directory '${@}' not found"
|
||||
echo "Try \`autojump --help\` for more information."
|
||||
false
|
||||
else
|
||||
case ${OSTYPE} in
|
||||
linux-gnu)
|
||||
xdg-open "$(autojump $@)"
|
||||
;;
|
||||
darwin*)
|
||||
open "$(autojump $@)"
|
||||
;;
|
||||
cygwin)
|
||||
cmd /C start "" $(cygpath -w -a $(pwd))
|
||||
;;
|
||||
*)
|
||||
echo "Unknown operating system." 1>&2
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
}
|
||||
|
||||
function jco {
|
||||
|
@ -62,20 +62,26 @@ function jc {
|
||||
}
|
||||
|
||||
function jo {
|
||||
case ${OSTYPE} in
|
||||
linux-gnu)
|
||||
xdg-open "$(autojump $@)"
|
||||
;;
|
||||
darwin*)
|
||||
open "$(autojump $@)"
|
||||
;;
|
||||
cygwin)
|
||||
cmd /C start "" $(cygpath -w -a $(pwd))
|
||||
;;
|
||||
*)
|
||||
echo "Unknown operating system." 1>&2
|
||||
;;
|
||||
esac
|
||||
if [ -z $(autojump $@) ]; then
|
||||
echo "autojump: directory '${@}' not found"
|
||||
echo "Try \`autojump --help\` for more information."
|
||||
false
|
||||
else
|
||||
case ${OSTYPE} in
|
||||
linux-gnu)
|
||||
xdg-open "$(autojump $@)"
|
||||
;;
|
||||
darwin*)
|
||||
open "$(autojump $@)"
|
||||
;;
|
||||
cygwin)
|
||||
cmd /C start "" $(cygpath -w -a $(pwd))
|
||||
;;
|
||||
*)
|
||||
echo "Unknown operating system." 1>&2
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
}
|
||||
|
||||
function jco {
|
||||
|
Loading…
Reference in New Issue
Block a user