1
0
mirror of https://github.com/wting/autojump synced 2024-09-28 22:10:45 +00:00

Merge pull request #183 from jsliang/master

Handle autojump errors when opening file manager.

Closes #177.
This commit is contained in:
William Ting 2013-02-14 11:11:12 -08:00
commit 70aad547b8
2 changed files with 40 additions and 28 deletions

View File

@ -98,20 +98,26 @@ function jc {
} }
function jo { function jo {
case ${OSTYPE} in if [ -z $(autojump $@) ]; then
linux-gnu) echo "autojump: directory '${@}' not found"
xdg-open "$(autojump $@)" echo "Try \`autojump --help\` for more information."
;; false
darwin*) else
open "$(autojump $@)" case ${OSTYPE} in
;; linux-gnu)
cygwin) xdg-open "$(autojump $@)"
cmd /C start "" $(cygpath -w -a $(pwd)) ;;
;; darwin*)
*) open "$(autojump $@)"
echo "Unknown operating system." 1>&2 ;;
;; cygwin)
esac cmd /C start "" $(cygpath -w -a $(pwd))
;;
*)
echo "Unknown operating system." 1>&2
;;
esac
fi
} }
function jco { function jco {

View File

@ -62,20 +62,26 @@ function jc {
} }
function jo { function jo {
case ${OSTYPE} in if [ -z $(autojump $@) ]; then
linux-gnu) echo "autojump: directory '${@}' not found"
xdg-open "$(autojump $@)" echo "Try \`autojump --help\` for more information."
;; false
darwin*) else
open "$(autojump $@)" case ${OSTYPE} in
;; linux-gnu)
cygwin) xdg-open "$(autojump $@)"
cmd /C start "" $(cygpath -w -a $(pwd)) ;;
;; darwin*)
*) open "$(autojump $@)"
echo "Unknown operating system." 1>&2 ;;
;; cygwin)
esac cmd /C start "" $(cygpath -w -a $(pwd))
;;
*)
echo "Unknown operating system." 1>&2
;;
esac
fi
} }
function jco { function jco {