[Bug 726939] New: bash completion for systemctl breaks completion for stdout redirection
https://bugzilla.novell.com/show_bug.cgi?id=726939 https://bugzilla.novell.com/show_bug.cgi?id=726939#c0 Summary: bash completion for systemctl breaks completion for stdout redirection Classification: openSUSE Product: openSUSE 12.1 Version: Factory Platform: x86-64 OS/Version: Other Status: NEW Severity: Normal Priority: P5 - None Component: Basesystem AssignedTo: bnc-team-screening@forge.provo.novell.com ReportedBy: koenig@linux.de QAContact: qa@suse.de Found By: --- Blocker: --- due to some bug reports around systemd I noticed the following (as root): # ls -l sys* -rw-r--r-- 1 root root 1058 Oct 27 09:34 systemctl-failed-1 -rw-r--r-- 1 root root 1058 Oct 27 09:35 systemctl-failed-2 -rw-r--r-- 1 root root 2115 Oct 27 21:40 systemctl_show_home.mount-0 -rw-r--r-- 1 root root 2058 Oct 27 21:46 systemctl_show_home.mount-after-mount -rw-r--r-- 1 root root 1903 Oct 27 21:46 systemctl_show_home.mount-before-mount -rw-r--r-- 1 root root 215408 Oct 26 15:04 systemd-dmesg-1 -rw-r--r-- 1 root root 216315 Oct 26 15:41 systemd-dmesg-2 -rw-r--r-- 1 root root 216061 Oct 27 09:21 systemd-dmesg-3 -rw-r--r-- 1 root root 250241 Oct 27 10:59 systemd-dmesg-4 -rw-r--r-- 1 root root 213067 Oct 27 17:38 systemd-dmesg-5 # systemctl > sys<TAB><TAB> # systemctl > ./s<TAB><TAB> do not show *any* output/completion :-( # systemctl > s<TAB><TAB> shows: set-environment show show-environment snapshot start status stop # complete | grep system complete -F _systemctl systemctl why is that completion relevant for output redirection ? I hate bash completions :-((( -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=726939 https://bugzilla.novell.com/show_bug.cgi?id=726939#c Andreas Jaeger <aj@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |werner@suse.com AssignedTo|bnc-team-screening@forge.pr |fcrozat@suse.com |ovo.novell.com | -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=726939 https://bugzilla.novell.com/show_bug.cgi?id=726939#c1 --- Comment #1 from Dr. Werner Fink <werner@suse.com> 2011-10-28 07:57:15 UTC --- Hmmm ... echo 'complete -r' >> ~/.bashrc but be aware then only file completion will happen. Nevertheless the file /etc/bash_completion.d/systemctl-bash-completion.sh is part of systemd, author was Ran Benita. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=726939 https://bugzilla.novell.com/show_bug.cgi?id=726939#c2 --- Comment #2 from Frederic Crozat <fcrozat@suse.com> 2011-10-31 12:41:10 UTC --- hmm, I'm seeing the exact same "issue" with zypper completion : zypper lr > <TAB> <TAB> and it give options of zypper.. Not sure it is a systemd bash completion issue... -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=726939 https://bugzilla.novell.com/show_bug.cgi?id=726939#c3 --- Comment #3 from Harald Koenig <koenig@linux.de> 2011-10-31 16:41:28 UTC --- it's a bash completion issue (more preceise the definition of the completions). I just played around a bit with the zypper completions (systemctl later, have to reboot to run systemd again;). I noticed that with complete -o default -o bashdefault -F _zypper zypper or complete -o bashdefault -o default -F _zypper zypper things are *much* better for my typical usage pattern, but your example with a space character after ">" still shows zypper lr opts. without space after ">" filenames get completed, or if you type some letter after "> " file/dir name completion gets triggered too (likely only because all further possible completions for "zypper lr" shall start with "--", so there is no zypper-match for something like a<TAB> but with both -o default and -o bashdefault I get back all the expected behavior for file/dir name completions! order of those options does not seem to be important?! right now there are no "-o comp-option"s set for systemctl: $ complete -p systemctl complete -F _systemctl systemctl I guess for systemd complete -o default -o bashdefault -F _systemctl systemctl might be a much better start (at least for me?!) -- will try later... FYI: my test pattern are like this (in a directory with multiple files starting with au* and exactly one directory starting with au*)": command > au<TAB><TAB> command > au*<TAB><TAB> (note the * !) both shall show all files and the directory. command > au*/<TAB> shall directly expands to the single directory name. "shall" == that's the normal behavior in bash if there are no special completions defined for "command" -- and some additional completion hints shall not obscure or break those well known defaults (which still work fine for all other commands), I very much vote for the principle of least surprise! -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=726939 https://bugzilla.novell.com/show_bug.cgi?id=726939#c Jean Delvare <jdelvare@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- OS/Version|Other |openSUSE 12.1 -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=726939 https://bugzilla.novell.com/show_bug.cgi?id=726939#c Frederic Crozat <fcrozat@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- AssignedTo|fcrozat@suse.com |systemd-maintainers@suse.de -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=726939 https://bugzilla.novell.com/show_bug.cgi?id=726939#c4 Dr. Werner Fink <werner@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |WONTFIX --- Comment #4 from Dr. Werner Fink <werner@suse.com> 2014-01-13 14:15:08 UTC --- For systemctl nor for zypper the options -o default nor -o bashdefault makes sense. Only if all command opitons of e.g. systemctl have aplied you may use the `>' for redirecting the output of the *final* systemctl command to a file. Disabling command completion for systemctl does not make any sense ass systemctl. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
participants (1)
-
bugzilla_noreply@novell.com