Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 271521

Summary: app-shells/bash-completion-1.0-r3: broken completion for chsh from sys-apps/shadow-4.1.4.1
Product: Gentoo Linux Reporter: Martin von Gagern <Martin.vGagern>
Component: Current packagesAssignee: Gentoo Shell Tools project <shell-tools>
Status: RESOLVED FIXED    
Severity: normal CC: ikelos, samuel.lethiec
Priority: High    
Version: 2008.0   
Hardware: All   
OS: Linux   
URL: https://alioth.debian.org/tracker/index.php?func=detail&aid=311717&group_id=100114&atid=413095
Whiteboard:
Package list:
Runtime testing required: ---

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