[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Strange complete -C output
From: |
Chet Ramey |
Subject: |
Re: Strange complete -C output |
Date: |
Sun, 21 Nov 2021 17:33:29 -0500 |
User-agent: |
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:91.0) Gecko/20100101 Thunderbird/91.2.1 |
On 11/20/21 10:40 PM, Emily Seville wrote:
Bash version: GNU bash, version 5.0.17(1)-release (x86_64-pc-linux-gnu)
OS version: Linux Mint 20.2 Cinnamon
Hello! Why when I create *complete -C 'echo -e "aa\nab\n"' : *completion
and try use it I obtain additional garbage in output instead of only *ab
ab* hints?
"When the function or command is invoked, the
first argument ($1) is the name of the command whose arguments are be-
ing completed, the second argument ($2) is the word being completed,
and the third argument ($3) is the word preceding the word being com-
pleted on the current command line. "
So your echo command is echoing the arguments it receives when invoked by
the completion system.
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU chet@case.edu http://tiswww.cwru.edu/~chet/