File tree Expand file tree Collapse file tree 1 file changed +5
-7
lines changed Expand file tree Collapse file tree 1 file changed +5
-7
lines changed Original file line number Diff line number Diff line change 34
34
# # - <split-strategy> is the strategy that should be applied to the source-file
35
35
# # Can be one of DELETE | KEEP | MOVE
36
36
# #
37
- # # Call --help for more details
38
- # #
39
37
# / Usually when you want to split a file into several files under git, you would
40
38
# / loose the git history of this file. Often this is not desirable. The goal of
41
39
# / this script is to enable splitting one file under Git revision control into
@@ -196,10 +194,8 @@ printTopic() {
196
194
# Displays all lines in main script that start with '##'
197
195
# ------------------------------------------------------------------------------
198
196
shortUsage () {
199
- # shellcheck disable=SC2086
200
- [ " $* " ] && echo " $( basename $0 ) : $* "
201
- sed -n ' /^##/,/^$/s/^## \{0,1\}//p' " $0 "
202
- } # 2>/dev/null
197
+ grep ' ^##' < " $0 " | cut -c4-
198
+ }
203
199
# ==============================================================================
204
200
205
201
@@ -610,7 +606,9 @@ finish() {
610
606
printErrorMessages " ${g_aErrorMessages[*]} "
611
607
612
608
if [[ ${g_iExitCode} -eq 65 ]]; then
613
- shortUsage " ${@ } "
609
+ shortUsage
610
+ echo ' Call --help for more details'
611
+
614
612
fi
615
613
fi
616
614
You can’t perform that action at this time.
0 commit comments