diff --git a/Makefile b/Makefile index 72f54e9..f50f28a 100644 --- a/Makefile +++ b/Makefile @@ -13,7 +13,7 @@ install: @echo 'USAGE:' @echo '------' @echo 's - Saves the current directory as "bookmark_name"' - @echo 'g - Goes (cd) to the directory associated with "bookmark_name"' + @echo 'go - Goes (cd) to the directory associated with "bookmark_name"' @echo 'p - Prints the directory associated with "bookmark_name"' @echo 'd - Deletes the bookmark' @echo 'l - Lists all available bookmarks' diff --git a/README.md b/README.md index c13612f..9952a1f 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ ## Shell Commands s - Saves the current directory as "bookmark_name" - g - Goes (cd) to the directory associated with "bookmark_name" + go - Goes (cd) to the directory associated with "bookmark_name" p - Prints the directory associated with "bookmark_name" d - Deletes the bookmark l - Lists all available bookmarks @@ -22,8 +22,8 @@ $ cd /usr/local/lib/ $ s locallib $ l - $ g web - $ g webfolder + $ go web + $ go webfolder ## Where Bashmarks are stored diff --git a/bashmarks.sh b/bashmarks.sh index b77a8c1..3779944 100644 --- a/bashmarks.sh +++ b/bashmarks.sh @@ -24,8 +24,8 @@ # USAGE: # s bookmarkname - saves the curr dir as bookmarkname -# g bookmarkname - jumps to the that bookmark -# g b[TAB] - tab completion is available +# go bookmarkname - jumps to the that bookmark +# go b[TAB] - tab completion is available # p bookmarkname - prints the bookmark # p b[TAB] - tab completion is available # d bookmarkname - deletes the bookmark @@ -42,7 +42,7 @@ RED="0;31m" GREEN="0;33m" # save current directory to bookmarks -function s { +function sav { check_help $1 _bookmark_name_valid "$@" if [ -z "$exit_message" ]; then @@ -53,7 +53,7 @@ function s { } # jump to bookmark -function g { +function go { check_help $1 source $SDIRS target="$(eval $(echo echo $(echo \$DIR_$1)))" @@ -67,14 +67,14 @@ function g { } # print bookmark -function p { +function prt { check_help $1 source $SDIRS echo "$(eval $(echo echo $(echo \$DIR_$1)))" } # delete bookmark -function d { +function del { check_help $1 _bookmark_name_valid "$@" if [ -z "$exit_message" ]; then @@ -87,17 +87,17 @@ function d { function check_help { if [ "$1" = "-h" ] || [ "$1" = "-help" ] || [ "$1" = "--help" ] ; then echo '' - echo 's - Saves the current directory as "bookmark_name"' - echo 'g - Goes (cd) to the directory associated with "bookmark_name"' - echo 'p - Prints the directory associated with "bookmark_name"' - echo 'd - Deletes the bookmark' - echo 'l - Lists all available bookmarks' + echo 'sav - Saves the current directory as "bookmark_name"' + echo 'go - Goes (cd) to the directory associated with "bookmark_name"' + echo 'prt - Prints the directory associated with "bookmark_name"' + echo 'del - Deletes the bookmark' + echo 'lst - Lists all available bookmarks' kill -SIGINT $$ fi } # list bookmarks with dirnam -function l { +function lst { check_help $1 source $SDIRS @@ -158,12 +158,12 @@ function _purge_line { # bind completion command for g,p,d to _comp if [ $ZSH_VERSION ]; then - compctl -K _compzsh g - compctl -K _compzsh p - compctl -K _compzsh d + compctl -K _compzsh go + compctl -K _compzsh prt + compctl -K _compzsh del else shopt -s progcomp - complete -F _comp g - complete -F _comp p - complete -F _comp d + complete -F _comp go + complete -F _comp prt + complete -F _comp del fi