From 0697e09f1475317ee08c61a660fcb5dde0d247bd Mon Sep 17 00:00:00 2001 From: Emily Grace Seville Date: Sat, 27 Nov 2021 04:27:58 +1000 Subject: [PATCH] Fix --shell option for adduser (#8479) * Fix --shell option * Fix * Replace sed with string match * Change regex pattern --- share/completions/adduser.fish | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/share/completions/adduser.fish b/share/completions/adduser.fish index 3cd520f2c..19eed2bef 100644 --- a/share/completions/adduser.fish +++ b/share/completions/adduser.fish @@ -15,7 +15,7 @@ complete -c adduser -l gid -d 'When creating a group, force the groupid to be th complete -c adduser -l group -d 'Create a group' complete -c adduser -l help -d 'Display brief instructions' complete -c adduser -l home -d 'Use specified directory as the user\'s home directory' -x -a '(__fish_complete_directories)' -complete -c adduser -l shell -d 'Use shell as the user\'s login shell, rather than the default' -x -a '(cat /etc/shells)' +complete -c adduser -l shell -d 'Use shell as the user\'s login shell, rather than the default' -x -a '(string match --regex '^[^#].*' < /etc/shells)' complete -c adduser -l ingroup -d 'Add the new user to GROUP instead of a usergroup or the default group' -x -a '(cut -d : -f 1 /etc/group)' complete -c adduser -l no-create-home -d 'Do not create the home directory' complete -c adduser -l quiet -d 'Suppress informational messages, only show warnings and errors'