bug-bash
[Top][All Lists]
Advanced

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

Tab completion doesn't escape spaces when globbing while using autocd


From: Manuel Boni
Subject: Tab completion doesn't escape spaces when globbing while using autocd
Date: Tue, 27 Apr 2021 22:59:16 +0200

Configuration Information [Automatically generated, do not change]:
Machine: x86_64
OS: msys
Compiler: gcc
Compilation CFLAGS:  -DPROGRAM='bash.exe' -DCONF_HOSTTYPE='x86_64'
-DCONF_OSTYPE='msys' -DCONF_MACHTYPE='x86_64-pc-msys'
-DCONF_VENDOR='pc' -DLOCALEDIR='/usr/share/locale' -DPACKAGE='bash'
-DSHELL -DHAVE_CONFIG_H -DRECYCLES_PIDS   -I.  -I. -I./include -I./lib
 -DWORDEXP_OPTION -Wno-discarded-qualifiers -march=x86-64
-mtune=generic -O2 -pipe -Wno-parentheses -Wno-format-security
-D_STATIC_BUILD -g
uname output: MINGW64_NT-10.0-19042 Talete 3.1.7-340.x86_64 2021-03-26
22:17 UTC x86_64 Msys
Machine Type: x86_64-pc-msys

Bash Version: 4.4
Patch Level: 23
Release Status: release

Description:

I currently have these settings in my .bashrc:
shopt -s autocd
shopt -s globstar
shopt -s nocaseglob
bind 'set show-all-if-ambiguous on'
bind 'set completion-ignore-case on'
bind 'TAB:menu-complete'
bind '"\e[Z":menu-complete-backward'

Consider the path 'projects/uni/2020/Behavioral Science/'.
When I try to navigate to the 'Behavioral Science' directory using
`pushd projects/**/*beh*` and then pressing the TAB key,
the shell correctly expands the path to 'projects/uni/2020/Behavioral\
Science/'.
When I try to navigate to that directory typing
`projects/**/*beh*` and then pressing the TAB key,
the shell expands the path to 'projects/uni/2020/Behavioral Science/'
(without escaping the space)
and thus changing the directory will fail.
There is a side effect as well:
when I try again again to change directory using
`pushd projects/**/*beh*` and then pressing the TAB key,
the shell cannot expand the path at all and I get an error bell,
and the glob expansion remains broken until I open a new shell session.


Repeat-By:

1. Enable the settings described above
2. mkdir -p "projects/uni/2020/Behavioral Science"
3. pushd projects/**/*beh*<TAB><CR> (you will change directory successfully)
4. popd
5. projects/**/*beh*<TAB><CR> (changing directory will fail)
6. pushd projects/**/*beh*<TAB><CR> (you will get an error bell and
the path will not expand properly)

Thank you for your attention and have a nice day.

Best wishes,

Manuel Boni



reply via email to

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