From c4c80cbb8a7e16aa62c9fbf9a0768b63920372e4 Mon Sep 17 00:00:00 2001 From: sharder996 Date: Wed, 18 Oct 2023 11:14:48 -0500 Subject: [PATCH] [bash] reorder piping --- completions/bash/multipass | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/completions/bash/multipass b/completions/bash/multipass index 8d2c2c72a3..f69c424415 100644 --- a/completions/bash/multipass +++ b/completions/bash/multipass @@ -18,8 +18,8 @@ _multipass_complete() { local state=$1 - local cmd="multipass list --format=csv --no-ipv4" - [ -n "$state" ] && cmd="$cmd | \tail -n +2 | \awk -F',' '\$2 == \"$state\"'" + local cmd="multipass list --format=csv --no-ipv4 | \tail -n +2" + [ -n "$state" ] && cmd="$cmd | \awk -F',' '\$2 == \"$state\"'" local instances=$( \eval $cmd | \cut -d',' -f 1 | \tr '\r\n' ' ')