Skip to content

Commit

Permalink
[bash] reorder piping
Browse files Browse the repository at this point in the history
  • Loading branch information
sharder996 committed Oct 18, 2023
1 parent 21f81cd commit c4c80cb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions completions/bash/multipass
Original file line number Diff line number Diff line change
Expand Up @@ -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' ' ')

Expand Down

0 comments on commit c4c80cb

Please sign in to comment.