Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 271521 - app-shells/bash-completion-1.0-r3: broken completion for chsh from sys-apps/shadow-4.1.4.1
Summary: app-shells/bash-completion-1.0-r3: broken completion for chsh from sys-apps/s...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo Shell Tools project
URL: https://alioth.debian.org/tracker/ind...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-05-28 12:23 UTC by Martin von Gagern
Modified: 2009-06-13 02:49 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Martin von Gagern 2009-05-28 12:23:42 UTC
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.
Comment 2 Martin von Gagern 2009-06-01 08:49:08 UTC
(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.
Comment 3 Jeremy Olexa (darkside) (RETIRED) archtester gentoo-dev Security 2009-06-13 02:49:11 UTC
I added git commit 86574164df810ecbd53ae841c15b38e5b06dc068 to -r5