Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 899186 - sys-apps/util-linux: trying to invoke bash completion on "su - -s" outputs "chsh --help"
Summary: sys-apps/util-linux: trying to invoke bash completion on "su - -s" outputs "c...
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo's Team for Core System packages
Depends on:
Reported: 2023-03-03 20:23 UTC by ephemer0l
Modified: 2024-05-03 10:37 UTC (History)
3 users (show)

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


Note You need to log in before you can comment on or make changes to this bug.
Description ephemer0l 2023-03-03 20:23:31 UTC
Experienced with bash-5.1_p16-r2, bash-completion-2.11, and util-linux-2.38.1.

I tried to tab complete the shell in 'su - portage -s /bin/b<TAB>' and it exited displaying 'chsh --help'

Reproducible: Always

Steps to Reproduce:
1. su - portage -s /bin/b<TAB>

Actual Results:  
chsh --help printed

Expected Results:  
tab complete the shell
Comment 1 Arthur Zamarin archtester Gentoo Infrastructure gentoo-dev Security 2024-05-03 10:37:41 UTC
Since then, the current completion file for su is installed by util-linux:

> sys-apps/util-linux: /usr/share/bash-completion/completions/su

I suspect the fix to completion file will be similar to

Or if we want to limit to only existing shells, improve my oneline:

> while read line; do  [[ -e "${line}" ]] && echo "${line}"; done < /etc/shells