Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > gnu.bash.bug > #11168

Troubles with autocompletion of filenames with square brackets

From deterenkelt.github@gmail.com
Newsgroups gnu.bash.bug
Subject Troubles with autocompletion of filenames with square brackets
Date 2015-07-10 10:36 +0300
Message-ID <mailman.6668.1436534303.904.bug-bash@gnu.org> (permalink)

Show all headers | View raw


Configuration Information [Automatically generated, do not change]:
Machine: x86_64
OS: linux-gnu
Compiler: x86_64-pc-linux-gnu-gcc
Compilation CFLAGS:  -DPROGRAM='bash' -DCONF_HOSTTYPE='x86_64' -DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='x86_64-pc-linux-gnu' -DCONF_VENDOR='pc' -DLOCALEDIR='/usr/share/locale' -DPACKAGE='bash' -DSHELL -DHAVE_CONFIG_H   -I. -I./include -I. -I./include -I./lib  -DDEFAULT_PATH_VALUE='/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin' -DSTANDARD_UTILS_PATH='/bin:/usr/bin:/sbin:/usr/sbin' -DSYS_BASHRC='/etc/bash/bashrc' -DSYS_BASH_LOGOUT='/etc/bash/bash_logout' -DNON_INTERACTIVE_LOGIN_SHELLS -DSSH_SOURCE_BASHRC -march=corei7-avx -O2 -pipe -fomit-frame-pointer         --param l1-cache-size=32         --param l1-cache-line-size=64         --param l2-cache-size=6144
uname output: Linux home 3.16.6-geek-i5 #11 SMP PREEMPT Fri Jul 3 19:54:14 MSK 2015 x86_64 Intel(R) Core(TM) i5-2500K CPU @ 3.30GHz GenuineIntel GNU/Linux
Machine Type: x86_64-pc-linux-gnu

Bash Version: 4.3
Patch Level: 39
Release Status: release

Description:
	Autocompletion fails for files starting with an opening square bracket and having closing bracket somewhere in the filename.

Repeat-By:
	$ mkdir temp && cd temp
	$ mkdir -p one/{\[bad\]\ folder,\[yet\]\ another\ bad\ folder}

	Now try

	$ cd one<TAB>    # cd one/\[   ← should appear

	$ mkdir -p \[one\]/{\[bad\]\ folder,\[yet\]\ another\ bad\ folder}

	Type

	$ cd [<TAB>   # cd \[one\]/   ← should appear
	$ cd \[one\]/<TAB>    ← further completions do not work

	$ mkdir -p \[two\]/{\[bad\]\ folder,\[yet\]\ another\ bad\ folder}

	$ cd [<TAB>  # cd \[   ← should appear
	$ cd \[t<TAB>  # ← doesn’t work.
	$ cd \[tw<TAB>  # ← doesn’t work.
	$ cd \[two<TAB>  # ← doesn’t work.
	$ cd \[two]<TAB>  # ← doesn’t work.
	$ cd \[two\]<TAB>  # ← doesn’t work.

	But if you type

	$ cd [two<TAB>  # cd \[two\]/  ← should appear

	Surprise — this works! However…

	$ cd \[two\]/<TAB>  # ← no further completions work :(


Fix:
	[Description of how to fix the problem.  If you don't know a
	fix for the problem, don't include this section.]

Back to gnu.bash.bug | Previous | Next | Find similar


Thread

Troubles with autocompletion of filenames with square brackets deterenkelt.github@gmail.com - 2015-07-10 10:36 +0300

csiph-web