Opt.UNARY, Opt.MULTI, Opt.NOACTION, Opt.INCREMENTDEFAULTCOUNTER),
SUBSTITUTIONS(Type.FLOW,
"The following argument values allow (or don't allow) subsituting filename parts. This is initially true. Valid substitutions are {basename} - the filename-without-extension of the currently --opened file (or first --appended file),\n"
- + "{dirname}, - the directory (folder) name of the currently --opened file (or first --appended file),\n"
+ + "{dirname} - the directory (folder) name of the currently --opened file (or first --appended file),\n"
+ "{argfilebasename} - the filename-without-extension of the current --argfile,\n"
+ "{argfiledirname} - the directory (folder) name of the current --argfile,\n"
+ "{n} - the value of the index counter (starting at 0).\n"
while (line.length() > descLength)
{
int splitIndex = line.lastIndexOf(" ", descLength);
- if (splitIndex > descLength)
- {
- break;
- }
- else
- {
- splitDescLinesList.add(line.substring(0, splitIndex));
- line = line.substring(splitIndex + 1);
- }
+ splitDescLinesList.add(line.substring(0, splitIndex));
+ line = line.substring(splitIndex + 1);
}
splitDescLinesList.add(line);
}
while (splitDescLines.hasNext())
{
if (first)
+ {
sb.append(ARGDESCRIPTIONSEPARATOR);
+ }
else
+ {
sb.append(String.format("%-"
+ (maxArgLength + ARGDESCRIPTIONSEPARATOR.length()) + "s",
""));
+ }
sb.append(splitDescLines.next());
sb.append(System.lineSeparator());
first = false;
if [ "${ISMACOS}" != 1 ]; then # older macos doesn't like uname -o, best to avoid
if [ "$(uname -o)" = "Cygwin" ]; then
# CYGWIN
- echo "When using relative paths in args within Cygwin, please start with './' or '../'" >&2
CLASSPATH=$(cygpath -pw "${CLASSPATH}")
# now for some arg paths fun. only translating paths starting with './', '../', '/' or '~'
ARGS=()
ARGS=( "${ARGS[@]}" "${ARG}" )
fi
done
- elif uname -r | grep Microsoft >/dev/null; then
+ elif uname -r | grep -i microsoft | grep -i wsl >/dev/null; then
# WSL
- echo "When using relative paths in args within WSL, please start with './' or '../'" >&2
CLASSPATH=""
for JARPATH in "${JARPATHS[@]}"; do
[ -n "${CLASSPATH}" ] && CLASSPATH="${CLASSPATH};"