File tree Expand file tree Collapse file tree 1 file changed +10
-6
lines changed Expand file tree Collapse file tree 1 file changed +10
-6
lines changed Original file line number Diff line number Diff line change @@ -168,10 +168,10 @@ function canonicalize {
168168 echo " $result "
169169}
170170
171- while [[ " ${1 : 0 : 1} " = " - " || " $1 " =~ ^ \+ ([0-9]+)$ ]]; do
171+ while [[ " $1 " ! = " " ]]; do
172172 case $1 in
173173 -)
174- break
174+ filepaths+=( " - " )
175175 ;;
176176 --)
177177 shift
@@ -220,12 +220,16 @@ while [[ "${1:0:1}" = "-" || "$1" =~ ^\+([0-9]+)$ ]]; do
220220 showusage
221221 exit 0
222222 ;;
223- +[0-9]* )
223+ +[0-9][0-9] * )
224224 selections+=(${1: 1} )
225225 ;;
226226 * )
227- showusage
228- exit 1
227+ if [[ " ${1: 0: 1} " = " -" ]]; then
228+ showusage
229+ exit 1
230+ else
231+ filepaths+=(" $1 " )
232+ fi
229233 ;;
230234 esac
231235
@@ -236,7 +240,7 @@ if [[ "$host" = "auto" && "$SSH_CONNECTION" != "" ]]; then
236240 host=${SSH_CONNECTION%% * }
237241fi
238242
239- filepaths=(" $@ " )
243+ filepaths=(" ${filepaths[@]} " " $ @" )
240244
241245if [ " ${filepaths[*]} " = " " ]; then
242246 if [[ $nowait = false ]]; then
You can’t perform that action at this time.
0 commit comments