diff options
author | Soispha <soispha@vhack.eu> | 2024-02-28 21:27:02 +0100 |
---|---|---|
committer | Soispha <soispha@vhack.eu> | 2024-02-28 21:30:29 +0100 |
commit | 48e468ca14468909698978231d98506f37efd32d (patch) | |
tree | ae835641529b9574773e42f3f35942d9c5256a32 | |
parent | fix(hm/conf/zsh/command_not_found.sh): Add missing space in cmd name (diff) | |
download | nixos-config-48e468ca14468909698978231d98506f37efd32d.tar.gz nixos-config-48e468ca14468909698978231d98506f37efd32d.zip |
fix(hm/conf/zsh/command_not_found.sh): Improve case 2 output
-rw-r--r-- | hm/soispha/conf/zsh/config/command_not_found.sh | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/hm/soispha/conf/zsh/config/command_not_found.sh b/hm/soispha/conf/zsh/config/command_not_found.sh index 52671c5a..fb21b676 100644 --- a/hm/soispha/conf/zsh/config/command_not_found.sh +++ b/hm/soispha/conf/zsh/config/command_not_found.sh @@ -48,11 +48,7 @@ EOF The program '$cmd' is currently not installed. It is provided by several packages. You can run it once with: EOF - counter=0 - while read -r attr; do - eprintln "$(printf "%3s" "$counter") nix shell $toplevel#$attr" - counter=$((counter + 1)) - done <"$(ptmp "$attrs")" + awk --assign=toplevel="$toplevel" 'BEGIN{counter=0} {printf("%3s)", counter); printf(" nix shell %s#%s\n", toplevel, $1); counter+=1}' "$(ptmp "$attrs")" ;; esac |