Bug#922315: "set <TAB>" pulls in -o/+o names too

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Bug#922315: "set <TAB>" pulls in -o/+o names too

積丹尼 Dan Jacobson
Package: bash-completion
Version: 1:2.8-5

# ls m*
my.rc.local
# set m<TAB>
monitor      my.rc.local

So what good is doing
# set monitor
for?

Oh, I see

# mkdir /tmp/n
# cd /tmp/n
# set <TAB>
allexport             hashall               monitor               nounset               verbose
braceexpand           histexpand            noclobber             onecmd                vi
emacs                 history               noexec                physical              xtrace
errexit               ignoreeof             noglob                pipefail
errtrace              interactive-comments  nolog                 posix
functrace             keyword               notify                privileged

They are supposed to be only after -o, +o etc.!

All I wanted to do was set some filenames, without this interference.

Reply | Threaded
Open this post in threaded view
|

Bug#922315: "set <TAB>" pulls in -o/+o names too

Gabriel F. T. Gomes-2
On Thu, Feb 14 2019, 積丹尼 Dan Jacobson wrote:
>
> # set <TAB>
> allexport             hashall               monitor               nounset               verbose
> braceexpand           histexpand            noclobber             onecmd                vi
> emacs                 history               noexec                physical              xtrace
> errexit               ignoreeof             noglob                pipefail
> errtrace              interactive-comments  nolog                 posix
> functrace             keyword               notify                privileged

This is caused by this line in bash_completion:

  # set completes with set options
  complete -A setopt set

which works to suggest completions for "set +o" and "set -o", but has
this undesired side-effect.  I don't know how to fix this, yet, but
while this is broken, you could use Alt+/ to complete with filenames.

Reply | Threaded
Open this post in threaded view
|

Bug#922315: "set <TAB>" pulls in -o/+o names too

積丹尼 Dan Jacobson
In reply to this post by 積丹尼 Dan Jacobson
GFTG> while this is broken, you could use Alt+/ to complete with filenames.

Ah, (or ESC /). Good to know.