From d7366e94669449556f20c44b96486168dffa81ca Mon Sep 17 00:00:00 2001 From: Jorge Bucaran Date: Sat, 24 Jan 2015 06:41:06 +0900 Subject: [PATCH] seq call in getopts should specify negative step --- Dockerfile | 1 - plugins/getopts/getopts.fish | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 7c0d604..73fb871 100644 --- a/Dockerfile +++ b/Dockerfile @@ -16,4 +16,3 @@ RUN /src/script/bootstrap.sh WORKDIR /root/.oh-my-fish CMD ["fish", "./script/run-tests.fish", "--verbose"] - diff --git a/plugins/getopts/getopts.fish b/plugins/getopts/getopts.fish index 4d02111..00ea722 100644 --- a/plugins/getopts/getopts.fish +++ b/plugins/getopts/getopts.fish @@ -277,7 +277,7 @@ function getopts set -l tokens (printf $substring | tr : \n) # Start last to first to avoid mistaking long w/ short options. - for index in (seq (count $tokens) 1) + for index in (seq (count $tokens) -1 1) set -l last_token (printf $substring | tail -c1) # Find options with optional argument in long-style and