Skip to content

Commit 737bdf8

Browse files
committed
fix(patch, truncate): Get help correctly on macos
The usage output on macos is in bsd style, not gnu style
1 parent 8fbd9b6 commit 737bdf8

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

completions/patch

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,11 @@ _comp_cmd_patch()
5050
[[ $was_split ]] && return
5151

5252
if [[ $cur == -* ]]; then
53-
_comp_compgen_help
53+
if [[ $OSTYPE == "darwin*" ]]; then
54+
_comp_compgen_usage
55+
else
56+
_comp_compgen_help
57+
fi
5458
[[ ${COMPREPLY-} == *= ]] && compopt -o nospace
5559
return
5660
fi

completions/truncate

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,11 @@ _comp_cmd_truncate()
2020
[[ $was_split ]] && return
2121

2222
if [[ $cur == -* ]]; then
23-
_comp_compgen_help
23+
if [[ $OSTYPE == "darwin*" ]]; then
24+
_comp_compgen_usage
25+
else
26+
_comp_compgen_help
27+
fi
2428
[[ ${COMPREPLY-} == *= ]] && compopt -o nospace
2529
return
2630
fi

0 commit comments

Comments
 (0)