2023-10-31 17:39:09 +01:00
|
|
|
From: Stanislav Brabec <sbrabec@suse.com>
|
|
|
|
Date: 2022-03-03 03:22:45+0000
|
|
|
|
References: bugzilla.suse.com/1172427
|
|
|
|
Subject: Fix "su -s" bash completion.
|
|
|
|
|
2022-03-08 10:54:48 +01:00
|
|
|
su -s <TAB> completion depends on "chsh -l" present in the
|
|
|
|
util-linux implementation of chsh. But SUSE uses chsh from shadow
|
|
|
|
package that does not include this feature. Use /etc/shells
|
|
|
|
instead.
|
|
|
|
|
|
|
|
--- util-linux/bash-completion/su
|
|
|
|
+++ util-linux/bash-completion/su
|
|
|
|
@@ -14,7 +14,7 @@ _su_module()
|
|
|
|
return 0
|
|
|
|
;;
|
|
|
|
'-s'|'--shell')
|
|
|
|
- COMPREPLY=( $(compgen -W "$(chsh -l)" -- $cur) )
|
|
|
|
+ COMPREPLY=( $(compgen -W "$(</etc/shells)" -- $cur) )
|
|
|
|
return 0
|
|
|
|
;;
|
|
|
|
'-h'|'--help'|'-V'|'--version')
|