Skip to content

Commit a47ca5c

Browse files
committed
git-effort: replace "wc | cut" with "wc | awk"
It looks "cut" may have different behaviour, e.g. BSD one works the way git-effort doesn't expect. "awk" looks to be one of possible fixes here.
1 parent 264726f commit a47ca5c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

bin/git-effort

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ trap show_cursor_and_cleanup INT
139139
heading
140140

141141
effort "${files[@]}" | tee $tmp
142-
test "$(wc -l $tmp | cut -d' ' -f1 )" -gt 1 && sort_effort
142+
test "$(wc -l $tmp | awk '{print $1}')" -gt 1 && sort_effort
143143
echo
144144

145145
show_cursor_and_cleanup

0 commit comments

Comments
 (0)