From 20b30f1fb6d3e2baf682944e7ebbd46840b05090 Mon Sep 17 00:00:00 2001 From: Giuseppe Rota Date: Mon, 10 Mar 2014 16:29:15 +0100 Subject: [PATCH] temporarily use aliases for jc and jco --- bin/autojump.bash | 22 ++++------------------ 1 file changed, 4 insertions(+), 18 deletions(-) diff --git a/bin/autojump.bash b/bin/autojump.bash index 827889b..4ef76f1 100644 --- a/bin/autojump.bash +++ b/bin/autojump.bash @@ -40,10 +40,10 @@ _complete_autojump_c() { # tabbing on empty "prefix", e.g. jc if [ -z "$current_word" ]; then autocomplete_pattern="$PWD" - # tabbing when last item is a number jc /some/path.*first.*second__2 #FIXME? + # tabbing when last item is a number, e.g. jc /some/path.*first.*second__2 elif [[ "$current_word" =~ ^[0-9]+$ ]]; then autocomplete_pattern="${PWD}__$current_word" - # tabbing when last item contains .*, e.g. jc /some/path.*first.*second + # tabbing when last item contains .*, e.g. jc /some/path.*another elif [[ "$current_word" =~ .*\.\*.* ]]; then autocomplete_pattern="$current_word" # tabbing when there are tokens, e.g. jc first second @@ -93,14 +93,7 @@ j() { } -# jump to child directory (subdirectory of current path) -jc() { - if [[ ${@} == -* ]]; then - autojump ${@} - else - j $(pwd) ${@} - fi -} +alias jc=j # open autojump results in file browser @@ -134,11 +127,4 @@ jo() { } -# open autojump results (child directory) in file browser -jco() { - if [[ ${@} == -* ]]; then - autojump ${@} - else - jo $(pwd) ${@} - fi -} +alias jco=jo