1
0
Fork 0
mirror of https://github.com/nix-community/home-manager synced 2024-12-12 12:59:49 +01:00

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

* man-home-manager: remove trailing whitespace

* home-manager: pass on `--debug` option

(cherry picked from commit 5eb199e937)
This commit is contained in:
bb010g 2021-06-05 15:11:06 -07:00 committed by Robert Helgesson
parent ffd6c84c25
commit 8d64c164fc
No known key found for this signature in database
GPG key ID: 36BDAA14C2797E89
4 changed files with 58 additions and 37 deletions

View file

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

View file

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

View file

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

View file

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