On Wed, Aug 27, 2014 at 7:32 PM, Alexander Kapshuk <[email protected]> wrote: > On Wed, Aug 27, 2014 at 7:01 PM, Bertrand Jacquin <[email protected]> wrote: >> Hi Michał, >> >> On 2014-08-27 17:06, Michał Górny wrote: >> >>> Please review. >> >> >>> +bashcomp_alias() { >>> + debug-print-function ${FUNCNAME} "${@}" >>> + >>> + [[ ${#} -lt 2 ]] && die "Usage: ${FUNCNAME} <basename> <alias>..." >>> + local base=${1} f >>> + shift >>> + >>> + for f; do >> >> >> is there a missing 'in "$@" after 'for f' ? f is never initialized. >> >> >>> + dosym "${base}" >>> "$(_bash-completion-r1_get_bashcompdir)/${f}" >>> + done >>> +} >> >> >> -- >> Beber >> > > bash(1) > for name [ [ in [ word ... ] ] ; ] do list ; done > <snip> > If the in word is omitted, the for command > executes list once for each positional > parameter that is set (see PARAMETERS below).
Here's a test run: cat test4loop #!/bin/sh for f do echo $f done sh -x test4loop 1 2 3 + for f in '"$@"' + echo 1 1 + for f in '"$@"' + echo 2 2 + for f in '"$@"' + echo 3 3
