1
0
mirror of https://github.com/wting/autojump synced 2024-10-27 20:34:07 +00:00

temporarily use aliases for jc and jco

This commit is contained in:
Giuseppe Rota 2014-03-10 16:29:15 +01:00
parent 69bfdf4cfe
commit 20b30f1fb6

View File

@ -40,10 +40,10 @@ _complete_autojump_c() {
# tabbing on empty "prefix", e.g. jc <tab> # tabbing on empty "prefix", e.g. jc <tab>
if [ -z "$current_word" ]; then if [ -z "$current_word" ]; then
autocomplete_pattern="$PWD" autocomplete_pattern="$PWD"
# tabbing when last item is a number jc /some/path.*first.*second__2<tab> #FIXME? # tabbing when last item is a number, e.g. jc /some/path.*first.*second__2<tab>
elif [[ "$current_word" =~ ^[0-9]+$ ]]; then elif [[ "$current_word" =~ ^[0-9]+$ ]]; then
autocomplete_pattern="${PWD}__$current_word" autocomplete_pattern="${PWD}__$current_word"
# tabbing when last item contains .*, e.g. jc /some/path.*first.*second<tab> # tabbing when last item contains .*, e.g. jc /some/path.*another<tab>
elif [[ "$current_word" =~ .*\.\*.* ]]; then elif [[ "$current_word" =~ .*\.\*.* ]]; then
autocomplete_pattern="$current_word" autocomplete_pattern="$current_word"
# tabbing when there are tokens, e.g. jc first second<tab> # tabbing when there are tokens, e.g. jc first second<tab>
@ -93,14 +93,7 @@ j() {
} }
# jump to child directory (subdirectory of current path) alias jc=j
jc() {
if [[ ${@} == -* ]]; then
autojump ${@}
else
j $(pwd) ${@}
fi
}
# open autojump results in file browser # open autojump results in file browser
@ -134,11 +127,4 @@ jo() {
} }
# open autojump results (child directory) in file browser alias jco=jo
jco() {
if [[ ${@} == -* ]]; then
autojump ${@}
else
jo $(pwd) ${@}
fi
}