Skip to content

Commit

Permalink
Merge branch 'issue-73'
Browse files Browse the repository at this point in the history
  • Loading branch information
aurora committed Apr 8, 2019
2 parents 81e2fd6 + a5b2a39 commit 86c1a28
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions rmate
Original file line number Diff line number Diff line change
Expand Up @@ -168,10 +168,10 @@ function canonicalize {
echo "$result"
}

while [[ "${1:0:1}" = "-" || "$1" =~ ^\+([0-9]+)$ ]]; do
while [[ "$1" != "" ]]; do
case $1 in
-)
break
filepaths+=("-")
;;
--)
shift
Expand Down Expand Up @@ -220,12 +220,16 @@ while [[ "${1:0:1}" = "-" || "$1" =~ ^\+([0-9]+)$ ]]; do
showusage
exit 0
;;
+[0-9]*)
+[0-9][0-9]*)
selections+=(${1:1})
;;
*)
showusage
exit 1
if [[ "${1:0:1}" = "-" ]]; then
showusage
exit 1
else
filepaths+=("$1")
fi
;;
esac

Expand All @@ -236,7 +240,7 @@ if [[ "$host" = "auto" && "$SSH_CONNECTION" != "" ]]; then
host=${SSH_CONNECTION%% *}
fi

filepaths=("$@")
filepaths=("${filepaths[@]}" "$@")

if [ "${filepaths[*]}" = "" ]; then
if [[ $nowait = false ]]; then
Expand Down

0 comments on commit 86c1a28

Please sign in to comment.