On 8/22/22 2:10 AM, Hyunho Cho wrote:
Bash Version: 5.1
Patch Level: 16
Release Status: release
##############################################################
when command completion function start running there are three
variables automatically setting
bash$ hello foo ba[tab]
$1 (command): hello
$2 (current): ba
$3 (previous): foo
bash$ echo -n "$COMP_WORDBREAKS" | od -a
0000000 sp ht nl " ' @ > < = ; | & ( :
bash$ hello --opt foo:[tab] # ":" is a member of $COMP_WORDBREAKS
$1 (command): hello
$2 (current): (empty) # default behavior
$3 (previous): foo
bash$ sudo hello --opt foo:[tab] # using sudo command
$1 (command): hello
$2 (current): : <----- not empty
$3 (previous): foo
I can't reproduce this. When I test without bash-completion installed, I
get the same null second argument with or without specifying `sudo'.
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU c...@case.edu http://tiswww.cwru.edu/~chet/