mirror of
https://github.com/wting/autojump
synced 2024-10-27 20:34:07 +00:00
Correctly identify OSTYPE for some Linux distros.
This commit is contained in:
parent
d6453dffef
commit
f75d01299d
@ -60,7 +60,7 @@ from autojump_utils import sanitize
|
|||||||
from autojump_utils import take
|
from autojump_utils import take
|
||||||
from autojump_utils import unico
|
from autojump_utils import unico
|
||||||
|
|
||||||
VERSION = '22.2.0-beta'
|
VERSION = '22.2.1-beta'
|
||||||
FUZZY_MATCH_THRESHOLD = 0.6
|
FUZZY_MATCH_THRESHOLD = 0.6
|
||||||
TAB_ENTRIES_COUNT = 9
|
TAB_ENTRIES_COUNT = 9
|
||||||
TAB_SEPARATOR = '__'
|
TAB_SEPARATOR = '__'
|
||||||
|
@ -93,7 +93,7 @@ jo() {
|
|||||||
output="$(autojump ${@})"
|
output="$(autojump ${@})"
|
||||||
if [[ -d "${output}" ]]; then
|
if [[ -d "${output}" ]]; then
|
||||||
case ${OSTYPE} in
|
case ${OSTYPE} in
|
||||||
linux|linux-gnu)
|
linux*)
|
||||||
xdg-open "${output}"
|
xdg-open "${output}"
|
||||||
;;
|
;;
|
||||||
darwin*)
|
darwin*)
|
||||||
@ -103,7 +103,7 @@ jo() {
|
|||||||
cygstart "" $(cygpath -w -a ${output})
|
cygstart "" $(cygpath -w -a ${output})
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
echo "Unknown operating system '${OSTYPE}'." 1>&2
|
echo "Unknown operating system: ${OSTYPE}." 1>&2
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
else
|
else
|
||||||
|
@ -74,14 +74,14 @@ function jo
|
|||||||
__aj_err "Try `autojump --help` for more information."
|
__aj_err "Try `autojump --help` for more information."
|
||||||
else
|
else
|
||||||
switch (sh -c 'echo ${OSTYPE}')
|
switch (sh -c 'echo ${OSTYPE}')
|
||||||
case linux-gnu
|
case 'linux*'
|
||||||
xdg-open (autojump $argv)
|
xdg-open (autojump $argv)
|
||||||
case 'darwin*'
|
case 'darwin*'
|
||||||
open (autojump $argv)
|
open (autojump $argv)
|
||||||
case cygwin
|
case cygwin
|
||||||
cygstart "" (cygpath -w -a (pwd))
|
cygstart "" (cygpath -w -a (pwd))
|
||||||
case '*'
|
case '*'
|
||||||
__aj_error "Unknown operating system."
|
__aj_error "Unknown operating system: '"$OSTYPE"'"
|
||||||
end
|
end
|
||||||
echo end
|
echo end
|
||||||
end
|
end
|
||||||
|
@ -85,7 +85,7 @@ jo() {
|
|||||||
local output="$(autojump ${@})"
|
local output="$(autojump ${@})"
|
||||||
if [[ -d "${output}" ]]; then
|
if [[ -d "${output}" ]]; then
|
||||||
case ${OSTYPE} in
|
case ${OSTYPE} in
|
||||||
linux-gnu)
|
linux*)
|
||||||
xdg-open "${output}"
|
xdg-open "${output}"
|
||||||
;;
|
;;
|
||||||
darwin*)
|
darwin*)
|
||||||
@ -95,7 +95,7 @@ jo() {
|
|||||||
cygstart "" $(cygpath -w -a ${output})
|
cygstart "" $(cygpath -w -a ${output})
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
echo "Unknown operating system." 1>&2
|
echo "Unknown operating system: ${OSTYPE}" 1>&2
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user