From 98d81c077cd56067cfa77fc30585bbb35f112da1 Mon Sep 17 00:00:00 2001 From: cerico Date: Sun, 30 Jul 2023 08:46:52 +0200 Subject: [PATCH] fix: improve matching of mi targets eg dont match undebugcss when looking for debugcss target --- files/zsh/main.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/files/zsh/main.zsh b/files/zsh/main.zsh index a739144..e6b261c 100644 --- a/files/zsh/main.zsh +++ b/files/zsh/main.zsh @@ -298,7 +298,7 @@ mi () { # List all Makefile targets or get info in target # ➜ mi start if [[ -n $1 ]] then local command=$1 - local output=$(awk -v cmd="$command" '/^.*:$/{p=0} $0 ~ cmd ".*:"{p=1} p; /^\t/{p=0}' Makefile) + local output=$(awk -v cmd="$command" '$1 == cmd ":" {p=1} p; /^\t/{p=0}' Makefile) [[ -n "$output" ]] && echo "$output" || echo "Target not found. Add with ➜ addtomake $command" else echo "Available commands:"