Steps to reproduce: 1. Type "chsh -s /sbin/" 2. Press tab Expected result: Normal file name completion when run as root (to select e.g. /sbin/nologin), or the shells listed in /etc/shells when called by a non-root user. Actual result: chsh: invalid option -- 'l' Usage: chsh [options] [LOGIN] Options: -h, --help display this help message and exit -s, --shell SHELL new login shell for the user account The completion does some special-casing for Debian systems, checking /etc/debian_version and using /etc/shells only on Debian. I have no clue where the -l argument used otherwise comes from, but any error message in such a completion function is even worse than no completion at all.
looks like you've been heard: http://git.debian.org/?p=bash-completion/bash-completion.git;a=commitdiff;h=86574164df810ecbd53ae841c15b38e5b06dc068
(In reply to comment #1) > looks like you've been heard: That's even before I encountered the issue. Hadn't checked upstream on this one. Thanks for the reference! So I'm looking forward for the next release (or revbump) to include this reply. My wish of doing a nomal path-name completion when running as root wasn't addressed by this changeset, though. I just reported that as a feature request upstream. See the URL for the corresponding tracker item.
I added git commit 86574164df810ecbd53ae841c15b38e5b06dc068 to -r5