From adaea605db26e3b6499e7226f931a36f951e95e8 Mon Sep 17 00:00:00 2001 From: Robert Helgesson Date: Sun, 2 Jan 2022 08:31:07 +0100 Subject: [PATCH] home-manager: document the `--version` command option Fixes #2604 --- docs/man-home-manager.xml | 14 ++++++++++++++ home-manager/completion.bash | 2 +- home-manager/completion.fish | 3 ++- home-manager/completion.zsh | 1 + home-manager/home-manager | 3 ++- 5 files changed, 20 insertions(+), 3 deletions(-) diff --git a/docs/man-home-manager.xml b/docs/man-home-manager.xml index 5a4f2d5d0..cbc977abc 100644 --- a/docs/man-home-manager.xml +++ b/docs/man-home-manager.xml @@ -102,6 +102,10 @@ + + --version + + @@ -431,6 +435,16 @@ + + + + + + + Prints the version number of the home-manager tool. + + + diff --git a/home-manager/completion.bash b/home-manager/completion.bash index cf471d129..7828224fc 100644 --- a/home-manager/completion.bash +++ b/home-manager/completion.bash @@ -293,7 +293,7 @@ _home-manager_completions () Options=( "-f" "--file" "-b" "-A" "-I" "-h" "--help" "-n" "--dry-run" "-v" \ "--verbose" "--cores" "--debug" "--impure" "--keep-failed" \ "--keep-going" "-j" "--max-jobs" "--no-substitute" "--no-out-link" \ - "--show-trace" "--substitute" "--builders") + "--show-trace" "--substitute" "--builders" "--version") # ^ « home-manager »'s options. diff --git a/home-manager/completion.fish b/home-manager/completion.fish index ad38d276c..cfffe8211 100644 --- a/home-manager/completion.fish +++ b/home-manager/completion.fish @@ -43,11 +43,12 @@ complete -c home-manager -n "__fish_use_subcommand" -x -a "expire-generations" - complete -c home-manager -F -s f -l "file" -d "The home configuration file" complete -c home-manager -x -s A -d "Select an expression in the configuration file" complete -c home-manager -F -s I -d "Add a path to the Nix expression search path" -complete -c home-manager -F -l "flake" -d "Use home-manager configuration at specified flake-uri" +complete -c home-manager -F -l "flake" -d "Use Home Manager configuration at specified flake-uri" complete -c home-manager -F -s b -d "Move existing files to new path rather than fail" complete -c home-manager -f -s v -l "verbose" -d "Verbose output" complete -c home-manager -f -s n -l "dry-run" -d "Do a dry run, only prints what actions would be taken" complete -c home-manager -f -s h -l "help" -d "Print this help" +complete -c home-manager -f -s h -l "version" -d "Print the Home Manager version" complete -c home-manager -x -l "arg" -d "Override inputs passed to home-manager.nix" complete -c home-manager -x -l "argstr" -d "Like --arg but the value is a string" diff --git a/home-manager/completion.zsh b/home-manager/completion.zsh index d0f0e2591..5748ee835 100644 --- a/home-manager/completion.zsh +++ b/home-manager/completion.zsh @@ -11,6 +11,7 @@ _arguments \ '--impure[impure]' \ '--keep-failed[keep failed]' \ '--keep-going[keep going]' \ + '--version[version]' \ '(-h --help)'{--help,-h}'[help]' \ '(-v --verbose)'{--verbose,-v}'[verbose]' \ '(-n --dry-run)'{--dry-run,-n}'[dry run]' \ diff --git a/home-manager/home-manager b/home-manager/home-manager index 680970837..8bc58f85c 100644 --- a/home-manager/home-manager +++ b/home-manager/home-manager @@ -505,11 +505,12 @@ function doHelp() { echo " -A ATTRIBUTE Optional attribute that selects a configuration" echo " expression in the configuration file." echo " -I PATH Add a path to the Nix expression search path." - echo " --flake flake-uri Use home-manager configuration at flake-uri" + echo " --flake flake-uri Use Home Manager configuration at flake-uri" echo " -b EXT Move existing files to new path rather than fail." echo " -v Verbose output" echo " -n Do a dry run, only prints what actions would be taken" echo " -h Print this help" + echo " --version Print the Home Manager version" echo echo "Options passed on to nix-build(1)" echo