home-manager: pass on --debug option (#2049)

* man-home-manager: remove trailing whitespace

* home-manager: pass on `--debug` option
This commit is contained in:
bb010g 2021-06-05 15:11:06 -07:00 committed by GitHub
parent dba802c1d9
commit 5eb199e937
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 58 additions and 37 deletions

View file

@ -12,47 +12,47 @@
</refnamediv> </refnamediv>
<refsynopsisdiv> <refsynopsisdiv>
<cmdsynopsis> <cmdsynopsis>
<command>home-manager</command> <group choice="req"> <command>home-manager</command> <group choice="req">
<arg choice="plain"> <arg choice="plain">
build build
</arg> </arg>
<arg choice="plain"> <arg choice="plain">
instantiate instantiate
</arg> </arg>
<arg choice="plain"> <arg choice="plain">
edit edit
</arg> </arg>
<arg choice="plain"> <arg choice="plain">
expire-generations <replaceable>timestamp</replaceable> expire-generations <replaceable>timestamp</replaceable>
</arg> </arg>
<arg choice="plain"> <arg choice="plain">
generations generations
</arg> </arg>
<arg choice="plain"> <arg choice="plain">
help help
</arg> </arg>
<arg choice="plain"> <arg choice="plain">
news news
</arg> </arg>
<arg choice="plain"> <arg choice="plain">
packages packages
</arg> </arg>
<arg choice="plain"> <arg choice="plain">
remove-generations <replaceable>ID …</replaceable> remove-generations <replaceable>ID …</replaceable>
</arg> </arg>
<arg choice="plain"> <arg choice="plain">
switch switch
</arg> </arg>
<arg choice="plain"> <arg choice="plain">
uninstall uninstall
</arg> </arg>
@ -61,63 +61,63 @@
<arg> <arg>
-A <replaceable>attrPath</replaceable> -A <replaceable>attrPath</replaceable>
</arg> </arg>
<arg> <arg>
-I <replaceable>path</replaceable> -I <replaceable>path</replaceable>
</arg> </arg>
<arg> <arg>
--flake <replaceable>flake-uri</replaceable> --flake <replaceable>flake-uri</replaceable>
</arg> </arg>
<arg> <arg>
-b <replaceable>ext</replaceable> -b <replaceable>ext</replaceable>
</arg> </arg>
<arg> <arg>
<group choice="req"> <group choice="req">
<arg choice="plain"> <arg choice="plain">
-f -f
</arg> </arg>
<arg choice="plain"> <arg choice="plain">
--file --file
</arg> </arg>
</group> <replaceable>path</replaceable> </group> <replaceable>path</replaceable>
</arg> </arg>
<arg> <arg>
<group choice="req"> <group choice="req">
<arg choice="plain"> <arg choice="plain">
-h -h
</arg> </arg>
<arg choice="plain"> <arg choice="plain">
--help --help
</arg> </arg>
</group> </group>
</arg> </arg>
<arg> <arg>
<group choice="req"> <group choice="req">
<arg choice="plain"> <arg choice="plain">
-n -n
</arg> </arg>
<arg choice="plain"> <arg choice="plain">
--dry-run --dry-run
</arg> </arg>
</group> </group>
</arg> </arg>
<arg> <arg>
--option <replaceable>name</replaceable> <replaceable>value</replaceable> --option <replaceable>name</replaceable> <replaceable>value</replaceable>
</arg> </arg>
<arg> <arg>
--cores <replaceable>number</replaceable> --cores <replaceable>number</replaceable>
</arg> </arg>
<arg> <arg>
<group choice="req"> <group choice="req">
<arg choice="plain"> <arg choice="plain">
@ -130,29 +130,33 @@
</group> </group>
<replaceable>number</replaceable> <replaceable>number</replaceable>
</arg> </arg>
<arg>
--debug
</arg>
<arg> <arg>
--keep-failed --keep-failed
</arg> </arg>
<arg> <arg>
--keep-going --keep-going
</arg> </arg>
<arg> <arg>
--show-trace --show-trace
</arg> </arg>
<arg> <arg>
--(no-)substitute --(no-)substitute
</arg> </arg>
<arg> <arg>
<group choice="req"> <group choice="req">
<arg choice="plain"> <arg choice="plain">
-v -v
</arg> </arg>
<arg choice="plain"> <arg choice="plain">
--verbose --verbose
</arg> </arg>
@ -456,6 +460,18 @@
</para> </para>
</listitem> </listitem>
</varlistentry> </varlistentry>
<varlistentry>
<term>
<option>--debug</option>
</term>
<listitem>
<para>
Passed on to <citerefentry>
<refentrytitle>nix-build</refentrytitle>
<manvolnum>1</manvolnum> </citerefentry>.
</para>
</listitem>
</varlistentry>
<varlistentry> <varlistentry>
<term> <term>
<option>--keep-failed</option> <option>--keep-failed</option>

View file

@ -285,8 +285,8 @@ _home-manager_completions ()
#--------------------------# #--------------------------#
local Options local Options
Options=( "-f" "--file" "-b" "-A" "-I" "-h" "--help" "-n" "--dry-run" "-v" "--verbose" "--show-trace" \ Options=( "-f" "--file" "-b" "-A" "-I" "-h" "--help" "-n" "--dry-run" "-v" "--verbose" \
"-j" "--max-jobs" ) "--cores" "--debug" "--keep-failed" "--keep-going" "-j" "--max-jobs" "--no-substitute" "--show-trace" "--substitute")
# ^ « home-manager »'s options. # ^ « home-manager »'s options.

View file

@ -7,6 +7,7 @@ _arguments \
'-I[search path]:PATH:_files -/' \ '-I[search path]:PATH:_files -/' \
'-b[backup files]:EXT:()' \ '-b[backup files]:EXT:()' \
'--cores[cores]:NUM:()' \ '--cores[cores]:NUM:()' \
'--debug[debug]' \
'--keep-failed[keep failed]' \ '--keep-failed[keep failed]' \
'--keep-going[keep going]' \ '--keep-going[keep going]' \
'(-h --help)'{--help,-h}'[help]' \ '(-h --help)'{--help,-h}'[help]' \
@ -42,11 +43,14 @@ case "$state" in
build|switch) build|switch)
_arguments \ _arguments \
'--cores[cores]:NUM:()' \ '--cores[cores]:NUM:()' \
'--debug[debug]' \
'--keep-failed[keep failed]' \ '--keep-failed[keep failed]' \
'--keep-going[keep going]' \ '--keep-going[keep going]' \
'--max-jobs[max jobs]:NUM:()' \ '--max-jobs[max jobs]:NUM:()' \
'--no-substitute[no substitute]' \
'--option[option]:NAME VALUE:()' \ '--option[option]:NAME VALUE:()' \
'--show-trace[show trace]' '--show-trace[show trace]' \
'--substitute[substitute]'
;; ;;
esac esac
esac esac

View file

@ -473,6 +473,7 @@ function doHelp() {
echo echo
echo " --arg(str) NAME VALUE Override inputs passed to home-manager.nix" echo " --arg(str) NAME VALUE Override inputs passed to home-manager.nix"
echo " --cores NUM" echo " --cores NUM"
echo " --debug"
echo " --keep-failed" echo " --keep-failed"
echo " --keep-going" echo " --keep-going"
echo " -j, --max-jobs NUM" echo " -j, --max-jobs NUM"
@ -572,7 +573,7 @@ while [[ $# -gt 0 ]]; do
PASSTHROUGH_OPTS+=("$opt" "$1") PASSTHROUGH_OPTS+=("$opt" "$1")
shift shift
;; ;;
--keep-failed|--keep-going|--show-trace\ --debug|--keep-failed|--keep-going|--show-trace\
|--substitute|--no-substitute) |--substitute|--no-substitute)
PASSTHROUGH_OPTS+=("$opt") PASSTHROUGH_OPTS+=("$opt")
;; ;;