From: Ævar Arnfjörð Bjarmason Date: Fri, 25 Nov 2022 09:06:50 GMT Subject: Re: [PATCH v7 1/3] git-jump: add an optional argument '--stdout' Message-ID: <221125.86y1rzmmfc.gmgdl@evledraar.gmail.com> In-Reply-To: <446777d300d73498bd7da709fad75731a13d0d59.1669347422.git.gitgitgadget@gmail.com> On Fri, Nov 25 2022, Yoichi Nakayama via GitGitGadget wrote: > From: Yoichi Nakayama > +use_stdout= > +while test $# -gt 0; do > + case "$1" in > + --stdout) > + use_stdout=t > + shift Put this "shift".... > + ;; > + --*) > + usage >&2 > + exit 1 > + ;; > + *) > + break > + ;; > + esac ... here instead, as I showed in a comment on 3/3 you'd need to to that, or copy/paste it for every option once you have >1 option. See e.g. "test_commit" in "t/test-lib-functions.sh" for a function with that pattern.