You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
println('Mog is a tool for running tasks from a .mog file in the current directory\n')
96
128
println('Usage:')
97
129
println(' mog [options] [task] [arguments]\n')
98
-
println('Any arguments passed after the task name will be forwarded to that task\n')
99
-
println('Options:')
100
-
println(' -l | --list:\tList available tasks')
101
-
println(' -h | --help:\tShow this output')
102
-
println(' -V | --version:\tShow the version of mog')
130
+
println('Any arguments passed after the task name will be forwarded to that task if you use the bash like {$#} syntax. For more info run "mog help arguments"\n')
131
+
print_options()
132
+
println('')
133
+
print_builtins_help()
103
134
println('')
104
135
print_commands(m)
105
136
}
106
137
138
+
fnprint_options() {
139
+
println('Options:')
140
+
println(' -l | --list:\t\tList available tasks')
141
+
println(' -h | --help:\t\tShow the help output')
142
+
println(' -V | --version:\tShow the version of mog')
143
+
}
144
+
145
+
fnprint_builtins_help() {
146
+
println("Built in task names that shouldn't be used in a .mog file:")
147
+
println(' help:\t\tShow the help output')
148
+
println(' symlink:\tCreate a symlink for the mog command to ~/.local/bin')
149
+
}
150
+
151
+
fnprint_arguments_help() {
152
+
println('Mog argument access:\n')
153
+
println('- Individual arguments are accessed using {$1} for the first argument, {$2} for the second, and so on')
154
+
println('- {$#} holds the total count of positional arguments')
155
+
println('- {$*} expands all positional parameters into a single string, separated by the a space')
156
+
println('- {$"*"} becomes a single string, e.g., "arg1 arg2 arg3"')
157
+
println('- {$@} expands positional parameters as separate quoted strings')
158
+
println('- {$"@"} expands to "{$1}" "{$2}" "{$3}", treating each argument as a distinct entity')
159
+
}
160
+
107
161
fnljust(str string, len int, fill string) string {
0 commit comments