Add support for properly aligning options with and without short and long names in...
authorLevente Mészáros <levente.meszaros@gmail.com>
Fri, 6 Nov 2009 12:12:00 +0000 (13:12 +0100)
committerLevente Mészáros <levente.meszaros@gmail.com>
Fri, 6 Nov 2009 12:12:00 +0000 (13:12 +0100)
Instead of having

-f --foo
--bar

Now we have

-f --foo
   --bar

when bar specifies #\Space as the short option designator.

parse-command-line-arguments.lisp

index f7508c5..3a59c3a 100644 (file)
@@ -241,6 +241,7 @@ or what's currently left of them as they are processed")
 
 (defun option-name (option-designator)
   (etypecase option-designator
+    ((eql #\Space) "  ") ; the same number of spaces just without the #\-
     (character (format nil "-~A" option-designator))
     (string    (format nil "--~A" option-designator))))