Gentoo Archives: gentoo-dev

From: Alexander Kapshuk <alexander.kapshuk@×××××.com>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] [PATCH] bash-completion-r1: support for aliasing completions for commands
Date: Wed, 27 Aug 2014 16:32:30
Message-Id: CAJ1xhMU8YjpF02f2OaSFQhtrtp1c1aDSU+dPQfFX5=SOPrjL5g@mail.gmail.com
In Reply to: Re: [gentoo-dev] [PATCH] bash-completion-r1: support for aliasing completions for commands by Bertrand Jacquin
1 On Wed, Aug 27, 2014 at 7:01 PM, Bertrand Jacquin <beber@××××××××.net> wrote:
2 > Hi Michał,
3 >
4 > On 2014-08-27 17:06, Michał Górny wrote:
5 >
6 >> Please review.
7 >
8 >
9 >> +bashcomp_alias() {
10 >> + debug-print-function ${FUNCNAME} "${@}"
11 >> +
12 >> + [[ ${#} -lt 2 ]] && die "Usage: ${FUNCNAME} <basename> <alias>..."
13 >> + local base=${1} f
14 >> + shift
15 >> +
16 >> + for f; do
17 >
18 >
19 > is there a missing 'in "$@" after 'for f' ? f is never initialized.
20 >
21 >
22 >> + dosym "${base}"
23 >> "$(_bash-completion-r1_get_bashcompdir)/${f}"
24 >> + done
25 >> +}
26 >
27 >
28 > --
29 > Beber
30 >
31
32 bash(1)
33 for name [ [ in [ word ... ] ] ; ] do list ; done
34 <snip>
35 If the in word is omitted, the for command
36 executes list once for each positional
37 parameter that is set (see PARAMETERS below).

Replies

Subject Author
Re: [gentoo-dev] [PATCH] bash-completion-r1: support for aliasing completions for commands Alexander Kapshuk <alexander.kapshuk@×××××.com>