diff options
Diffstat (limited to '')
-rw-r--r-- | hm/soispha/conf/zsh/config/command_not_found.sh | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/hm/soispha/conf/zsh/config/command_not_found.sh b/hm/soispha/conf/zsh/config/command_not_found.sh index ae6de636..f3339451 100644 --- a/hm/soispha/conf/zsh/config/command_not_found.sh +++ b/hm/soispha/conf/zsh/config/command_not_found.sh @@ -17,7 +17,7 @@ command_not_found_handle() { toplevel=nixpkgs # nixpkgs should always be available even in NixOS cmd="$1" attrs=$(nix-locate --minimal --no-group --type x --type s --top-level --whole-name --at-root "/bin/$cmd") - len=$(echo "$attrs" | wc -l) + len=$(if [ -n "$attrs" ]; then echo "$attrs" | wc -l; else echo 0; fi) case "$len" in 0) |