JAL-4187 JAL-629 JAL-3830 adjustments to Cygwin and WSL parts of bash launcher script...
[jalview.git] / src / jalview / bin / argparser / Arg.java
index 958569e..2a080fc 100644 (file)
@@ -198,7 +198,7 @@ public enum Arg
           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"
@@ -703,15 +703,8 @@ public enum Arg
       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);
     }
@@ -723,11 +716,15 @@ public enum Arg
       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;