From 48e468ca14468909698978231d98506f37efd32d Mon Sep 17 00:00:00 2001 From: Soispha Date: Wed, 28 Feb 2024 21:27:02 +0100 Subject: fix(hm/conf/zsh/command_not_found.sh): Improve case 2 output --- hm/soispha/conf/zsh/config/command_not_found.sh | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'hm/soispha/conf/zsh') 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 -- cgit 1.4.1