[Bug 905348] New: bash: tab completion with shell variable changes command line with backslash
http://bugzilla.novell.com/show_bug.cgi?id=905348 Bug ID: 905348 Summary: bash: tab completion with shell variable changes command line with backslash Classification: openSUSE Product: openSUSE Distribution Version: 13.2 Hardware: x86-64 OS: openSUSE 13.2 Status: NEW Severity: Normal Priority: P5 - None Component: Basesystem Assignee: bnc-team-screening@forge.provo.novell.com Reporter: rcoe@wi.rr.com QA Contact: qa-bugs@suse.de Found By: --- Blocker: --- export FOO=/some/directory somecommand $FOO/logs/def<TAB> When I hit tab the variable $FOO becomes \$FOO in the command line (When I hit tab the variable $FOO becomes <backslash>$FOO in the command line) -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.novell.com/show_bug.cgi?id=905348
--- Comment #3 from Rich Coe
http://bugzilla.novell.com/show_bug.cgi?id=905348
--- Comment #4 from Andrei Borzenkov
I've no time to hunt this bug. Is there any volunteer around here? IMHO the shell function _minimal does not handle the directory case of the value of a variable.
No. There are two chains - for $FOO and $FOO/. The former call chain is _longopt => _init_completion => _variables. It actually does everything right, but completions that are using _longopt also add filename context (-o filenames) which seem to cause bash to quote content of COMPREPLY. Default bash completions do not set filenames option or explicitly unset it if current word looks like variable expansion. The latter explicitly quotes argument in _filedir. I'm afraid there is no simple fix. _filedir should probably split string on '/', add initial part as prefix and complete only final part. But look at zsh _path_files to get an idea what it involves ... The actual question is - why systemd completion requires bash-completion at all? On the quick glance it does not use anything from its framework. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.novell.com/show_bug.cgi?id=905348
SMASH SMASH
http://bugzilla.novell.com/show_bug.cgi?id=905348
Swamp Workflow Management
http://bugzilla.novell.com/show_bug.cgi?id=905348
http://bugzilla.novell.com/show_bug.cgi?id=905348#c22
Sascha Weber
http://bugzilla.novell.com/show_bug.cgi?id=905348
Swamp Workflow Management
http://bugzilla.novell.com/show_bug.cgi?id=905348
Swamp Workflow Management
http://bugzilla.novell.com/show_bug.cgi?id=905348
Swamp Workflow Management
http://bugzilla.novell.com/show_bug.cgi?id=905348
Swamp Workflow Management
http://bugzilla.novell.com/show_bug.cgi?id=905348
Swamp Workflow Management
http://bugzilla.novell.com/show_bug.cgi?id=905348
http://bugzilla.novell.com/show_bug.cgi?id=905348#c32
--- Comment #32 from Swamp Workflow Management
participants (1)
-
bugzilla_noreply@novell.com