Skip to content

Commit

Permalink
Add completions for various user and group adding commands. Skip addg…
Browse files Browse the repository at this point in the history
…roup, since manual page was actually for adduser, most switches weren't applicable and I was too lazy to guess which ones.

darcs-hash:20080120020816-75c98-f937df6cb6789868a1385bfc3eb48f5ddefb3c43.gz
  • Loading branch information
liljencrantz committed Jan 20, 2008
1 parent 8cacb33 commit 75e26f0
Show file tree
Hide file tree
Showing 3 changed files with 61 additions and 0 deletions.
27 changes: 27 additions & 0 deletions share/completions/adduser.fish
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#
# Command specific completions for the adduser command.
# These completions where generated from the commands
# man page by the make_completions.py script, but may
# have been hand edited since.
#

complete -c adduser -l conf --description 'Specify config file" -r
complete -c adduser -l disabled-login --description 'Do not run passwd to set the password'
complete -c adduser -l disabled-password --description 'Like --disabled-login, but logins are still possible (for example using SSH RSA keys) but not using password authentication'
complete -c adduser -l force-badname --description 'By default, user and group names are checked against the configurable regular expression NAME_REGEX (or NAME_REGEX if --system is specified) specified in the configuration file'
complete -c adduser -l gecos --description 'Set the gecos field for the new entry generated' -r
complete -c adduser -l gid --description 'When creating a group, this option forces the new groupid to be the given number' -r
complete -c adduser -l group --description 'When combined with --system, a group with the same name and ID as the system user is created'
complete -c adduser -l help --description 'Display brief instructions'
complete -c adduser -l home --description 'Use specified directory as the user's home directory' -x -a '(__fish_complete_directories)'
complete -c adduser -l shell --description 'Use shell as the user's login shell, rather than the default specified by the configuration file' -x -a '(cat /etc/shells)'
complete -c adduser -l ingroup --description 'Add the new user to GROUP instead of a usergroup or the default group defined by USERS_GID in the configuration file' -x -a '(cat /etc/group|cut -d : -f 1)'
complete -c adduser -l no-create-home --description 'Do not create the home directory, even if it doesn't exist'
complete -c adduser -l quiet --description 'Suppress informational messages, only show warnings and errors'
complete -c adduser -l debug --description 'Be verbose, most useful if you want to nail down a problem with adduser'
complete -c adduser -l system --description 'Create a system user or group'
complete -c adduser -l uid --description 'Force the new userid to be the given number' -r
complete -c adduser -l firstuid --description 'Override the first uid in the range that the uid is chosen from (overrides FIRST_UID specified in the configuration file)' -r
complete -c adduser -l lastuid --description 'ID Override the last uid in the range that the uid is chosen from ( LAST_UID )' -r
complete -c adduser -l add_extra_groups --description 'Add new user to extra groups defined in the configuration file'
complete -c adduser -l version --description 'Display version and copyright information'
12 changes: 12 additions & 0 deletions share/completions/groupadd.fish
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#
# Command specific completions for the groupadd command.
# These completions where generated from the commands
# man page by the make_completions.py script, but may
# have been hand edited since.
#

complete -c groupadd -s f --description 'Exit with success status if the specified group already exists'
complete -c groupadd -s g --description 'The numerical value of the group\'s ID'
complete -c groupadd -s h -l help --description 'Display help message and exit'
complete -c groupadd -s K --description 'Overrides default key/value pairs from /etc/login'
complete -c groupadd -s o --description 'This option permits to add group with non-unique GID'
22 changes: 22 additions & 0 deletions share/completions/useradd.fish
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#
# Command specific completions for the useradd command.
# These completions where generated from the commands
# man page by the make_completions.py script, but may
# have been hand edited since.
#

complete -c useradd -s c -l comment --description 'A comment about this user' -r
complete -c useradd -s d -l home --description 'Home directory for the new user' -x -a '(__fish_complete_directories)'
complete -c useradd -s G -l groups --description 'Supplementary groups' -xa '(__fish_append , (cat /etc/group|cut -d : -f 1))'
complete -c useradd -s h -l help --description 'Display help message and exit'
complete -c useradd -s m -l create-home --description 'The user's home directory will be created if it does not exist'
complete -c useradd -s n --description 'A group having the same name as the user being added to the system will be created by default (when -g is not specified)'
complete -c useradd -s K -l key --description 'Overrides default key/value pairs from /etc/login'
complete -c useradd -s o -l non-unique --description 'Allow the creation of a user account with a duplicate (non-unique) UID'
complete -c useradd -s p -l password --description 'The encrypted password, as returned by crypt(3)' -r
complete -c useradd -s u -l uid --description 'The numerical value of the user's ID' -r
complete -c useradd -s b -l base-dir --description 'The initial path prefix for a new user's home directory' -r -a '(__fish_complete_directories)'
complete -c useradd -s e -l expiredate --description 'The date on which the user account is disabled' -r
complete -c useradd -s f -l inactive --description 'The number of days after a password has expired before the account will be disabled' -r
complete -c useradd -s g -l gid --description 'The group name or ID for a new user's initial group' -x -a '(cat /etc/group|cut -d : -f 1,3|sed -e "s/:/\n/")'
complete -c useradd -s s -l shell --description 'Name of the new user's login shell' -x -a '(cat /etc/shells)'

0 comments on commit 75e26f0

Please sign in to comment.