From 726b864785b1139ab659839d50a955fdafd59e11 Mon Sep 17 00:00:00 2001 From: Nathan Broadbent Date: Thu, 15 Aug 2013 23:53:40 -0700 Subject: [PATCH] $e{*} variables should be a maximum of 3 digits --- lib/git/status_shortcuts.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/git/status_shortcuts.sh b/lib/git/status_shortcuts.sh index e6d603a..e562063 100644 --- a/lib/git/status_shortcuts.sh +++ b/lib/git/status_shortcuts.sh @@ -119,9 +119,9 @@ scmb_expand_args() { first=1 OLDIFS="$IFS"; IFS=" " # We need to split on spaces to loop over expanded range for arg in "$@"; do - if [[ "$arg" =~ ^[0-9]+$ ]] ; then # Substitute $e{*} variables for any integers + if [[ "$arg" =~ ^[0-9]{0,3}$ ]] ; then # Substitute $e{*} variables for any integers if [ "$first" -eq 1 ]; then first=0; else printf '\t'; fi - if [ -e "$arg" ]; then + if [ -e "$arg" ]; then printf '%s' "$arg" else eval printf '%s' "\"\$$git_env_char$arg\""