Changed usage text to reflect '-' ranges instead of '..' ranges

This commit is contained in:
Tyler Holien
2012-04-25 15:01:52 -05:00
parent 6af0d5fede
commit 596b370b78

View File

@@ -60,8 +60,8 @@ git_add_shortcuts() {
if [ -z "$1" ]; then if [ -z "$1" ]; then
echo "Usage: ga <file> => git add <file>" echo "Usage: ga <file> => git add <file>"
echo " ga 1 => git add \$e1" echo " ga 1 => git add \$e1"
echo " ga 2..4 => git add \$e2 \$e3 \$e4" echo " ga 2-4 => git add \$e2 \$e3 \$e4"
echo " ga 2 5..7 => git add \$e2 \$e5 \$e6 \$e7" echo " ga 2 5-7 => git add \$e2 \$e5 \$e6 \$e7"
if [[ $ga_auto_remove == "yes" ]]; then if [[ $ga_auto_remove == "yes" ]]; then
echo -e "\nNote: Deleted files will also be staged using this shortcut." echo -e "\nNote: Deleted files will also be staged using this shortcut."
echo " To turn off this behaviour, change the 'auto_remove' option." echo " To turn off this behaviour, change the 'auto_remove' option."
@@ -98,8 +98,8 @@ git_add_patch_shortcuts() {
if [ -z "$1" ]; then if [ -z "$1" ]; then
echo "Usage: gap <file> => git add -p <file>" echo "Usage: gap <file> => git add -p <file>"
echo " gap 1 => git add -p \$e1" echo " gap 1 => git add -p \$e1"
echo " gap 2..4 => git add -p \$e2 \$e3 \$e4" echo " gap 2-4 => git add -p \$e2 \$e3 \$e4"
echo " gap 2 5..7 => git add -p \$e2 \$e5 \$e6 \$e7" echo " gap 2 5-7 => git add -p \$e2 \$e5 \$e6 \$e7"
else else
git_silent_add_patch_shortcuts "$@" git_silent_add_patch_shortcuts "$@"
# Makes sense to run 'git status' after this command. # Makes sense to run 'git status' after this command.
@@ -155,7 +155,7 @@ git_expand_args() {
fi fi
done done
} }
# Execute a command with expanded args, e.g. Delete files 6 to 12: $ ge rm 6..12 # Execute a command with expanded args, e.g. Delete files 6 to 12: $ ge rm 6-12
# Fails if command is a number or range (probably not worth fixing) # Fails if command is a number or range (probably not worth fixing)
exec_git_expand_args() { $(git_expand_args "$@"); } exec_git_expand_args() { $(git_expand_args "$@"); }