about summary refs log tree commit diff stats
path: root/modules
diff options
context:
space:
mode:
authorBenedikt Peetz <benedikt.peetz@b-peetz.de>2025-06-28 18:50:33 +0200
committerBenedikt Peetz <benedikt.peetz@b-peetz.de>2025-06-28 18:50:33 +0200
commita9f769866c6a73f6e26e42b0973bf4c7cecaaca5 (patch)
tree6d3e19790f39b66b0a9ece004ec88a5f6cee6daa /modules
parentmodules/zsh: Remove the insulting command not found handler (diff)
downloadnixos-config-a9f769866c6a73f6e26e42b0973bf4c7cecaaca5.zip
modules/nix-index/command_not_found: Avoid using a non-existing command
The `eprintln` was previously supplied (impurely) by my shell library,
and without it, the command-not-found handler goes into infinite
recursion.
Diffstat (limited to '')
-rw-r--r--modules/by-name/ni/nix-index/command_not_found.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/by-name/ni/nix-index/command_not_found.sh b/modules/by-name/ni/nix-index/command_not_found.sh
index f650cf7b..e3036797 100644
--- a/modules/by-name/ni/nix-index/command_not_found.sh
+++ b/modules/by-name/ni/nix-index/command_not_found.sh
@@ -31,7 +31,7 @@ command_not_found_handle() {
 
     case "$len" in
     0)
-        eprintln "$cmd: command not found"
+        printf "%s: command not found\n" "$cmd" >&2
         ;;
     1)
         # If only one package provides this, then we can invoke it