@@ -102,7 +102,7 @@ public void displayOptionUsage(PrintStream stream) {
102
102
public List <String > getOptionSyntax () {
103
103
List <String > list = new ArrayList <>();
104
104
list .add ("[--verbose]" );
105
- list .add ("[--width <integer>" );
105
+ list .add ("[--width <integer>] " );
106
106
list .add ("[--truncate <mode>]" );
107
107
list .add ("[--cell-height <integer>]" );
108
108
list .add ("<view>" );
@@ -138,7 +138,7 @@ public void execute(Deque<String> options) throws UserSyntaxException, UserDataE
138
138
if (acceptOption (options , "--width" )) {
139
139
configuration .width = acceptInt (options , "width" );
140
140
}
141
- if (options .size () == 1 ) {
141
+ if (options .size () == 1 && ! options . peek (). startsWith ( "-" ) ) {
142
142
String view = options .pop ();
143
143
try (EventStream stream = EventStream .openFile (file )) {
144
144
ViewPrinter vp = new ViewPrinter (configuration , stream );
@@ -149,8 +149,6 @@ public void execute(Deque<String> options) throws UserSyntaxException, UserDataE
149
149
couldNotReadError (file , ioe );
150
150
}
151
151
}
152
- System .out .println ("count:" + optionCount );
153
- System .out .println ("size:" + options .size ());
154
152
if (optionCount == options .size ()) {
155
153
String peek = options .peek ();
156
154
if (peek == null ) {
0 commit comments