help-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Help-bash] Command completion with * in the middle?


From: Peng Yu
Subject: Re: [Help-bash] Command completion with * in the middle?
Date: Sat, 26 Jan 2019 20:08:48 -0600

> f() {
>   local globchars='*?['
>   shopt -q extglob && globchars+='address@hidden'
>   local head=${3%%["$globchars"]*}
>   COMPREPLY=($(compgen -c -X '!'"$3" -- "$head"))
> }

Indeed. This is much faster. Thanks.

-- 
Regards,
Peng



reply via email to

[Prev in Thread] Current Thread [Next in Thread]