mirror of
https://github.com/nix-community/home-manager
synced 2024-12-24 02:39:48 +01:00
home-manager: look for '--help' on command line
This is a special case to work around the lack of long options in `getopts`.
This commit is contained in:
parent
66219f23bb
commit
04ea044917
1 changed files with 9 additions and 0 deletions
|
@ -296,6 +296,15 @@ function doHelp() {
|
|||
EXTRA_NIX_PATH=()
|
||||
HOME_MANAGER_CONFIG_ATTRIBUTE=""
|
||||
|
||||
# As a special case, if the user has given --help anywhere on the
|
||||
# command line then print help and exit.
|
||||
for arg in "$@"; do
|
||||
if [[ $arg == "--help" ]]; then
|
||||
doHelp
|
||||
exit 0
|
||||
fi
|
||||
done
|
||||
|
||||
while getopts f:I:A:vnh opt; do
|
||||
case $opt in
|
||||
f)
|
||||
|
|
Loading…
Reference in a new issue