util-linux/util-linux-bash-completion-su-chsh-l.patch
Jan Engelhardt 5070c16a96 Backport fixes from SLE15:
- Skip aarch64 decode path for rest of the architectures
  (bsc#1229476, util-linux-lscpu-skip-aarch64-decode.patch).
- agetty: Prevent login cursor escape (bsc#1194818,
  util-linux-agetty-prevent-cursor-escape.patch).
- Document unexpected side effects of lazy destruction
  (bsc#1159034, util-linux-umount-losetup-lazy-destruction.patch,
  util-linux-umount-losetup-lazy-destruction-generated.patch).
- And add more bug references.

OBS-URL: https://build.opensuse.org/package/show/Base:System/util-linux?expand=0&rev=576
2024-11-20 18:30:01 +00:00

22 lines
649 B
Diff

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.
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')