pull/582/merge
Taras 9 months ago committed by GitHub
commit 965cf38f62
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -96,20 +96,24 @@ jo() {
output="$(autojump ${@})" output="$(autojump ${@})"
if [[ -d "${output}" ]]; then if [[ -d "${output}" ]]; then
case ${OSTYPE} in if command -v explorer.exe >/dev/null 2>&1; then
linux*) explorer.exe "${output}"
xdg-open "${output}" else
;; case ${OSTYPE} in
darwin*) linux*)
open "${output}" xdg-open "${output}"
;; ;;
cygwin) darwin*)
cygstart "" $(cygpath -w -a ${output}) open "${output}"
;; ;;
*) cygwin)
echo "Unknown operating system: ${OSTYPE}." 1>&2 cygstart "" $(cygpath -w -a ${output})
;; ;;
esac *)
echo "Unknown operating system: ${OSTYPE}." 1>&2
;;
esac
fi
else else
echo "autojump: directory '${@}' not found" echo "autojump: directory '${@}' not found"
echo "\n${output}\n" echo "\n${output}\n"

@ -83,15 +83,19 @@ end
function jo function jo
set -l output (autojump $argv) set -l output (autojump $argv)
if test -d "$output" if test -d "$output"
switch $OSTYPE if command --search explorer.exe >/dev/null 2>&1 do
case 'linux*' explorer.exe (autojump $argv)
xdg-open (autojump $argv) else
case 'darwin*' switch $OSTYPE
open (autojump $argv) case 'linux*'
case cygwin xdg-open (autojump $argv)
cygstart "" (cygpath -w -a (pwd)) case 'darwin*'
case '*' open (autojump $argv)
__aj_err "Unknown operating system: \"$OSTYPE\"" case cygwin
cygstart "" (cygpath -w -a (pwd))
case '*'
__aj_err "Unknown operating system: \"$OSTYPE\""
end
end end
else else
__aj_err "autojump: directory '"$argv"' not found" __aj_err "autojump: directory '"$argv"' not found"

@ -91,20 +91,24 @@ jo() {
setopt localoptions noautonamedirs setopt localoptions noautonamedirs
local output="$(autojump ${@})" local output="$(autojump ${@})"
if [[ -d "${output}" ]]; then if [[ -d "${output}" ]]; then
case ${OSTYPE} in if command -v explorer.exe >/dev/null 2>&1; then
linux*) explorer.exe "${output}"
xdg-open "${output}" else
;; case ${OSTYPE} in
darwin*) linux*)
open "${output}" xdg-open "${output}"
;; ;;
cygwin) darwin*)
cygstart "" $(cygpath -w -a ${output}) open "${output}"
;; ;;
*) cygwin)
echo "Unknown operating system: ${OSTYPE}" 1>&2 cygstart "" $(cygpath -w -a ${output})
;; ;;
esac *)
echo "Unknown operating system: ${OSTYPE}" 1>&2
;;
esac
fi
else else
echo "autojump: directory '${@}' not found" echo "autojump: directory '${@}' not found"
echo "\n${output}\n" echo "\n${output}\n"

Loading…
Cancel
Save