Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
mincss
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Taddeüs Kroes
mincss
Commits
b39e4447
Commit
b39e4447
authored
Aug 10, 2015
by
Taddeüs Kroes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improved command-line usage
parent
bda5c1c0
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
2 deletions
+9
-2
main.ml
main.ml
+9
-2
No files found.
main.ml
View file @
b39e4447
...
@@ -35,7 +35,7 @@ let parse_args () =
...
@@ -35,7 +35,7 @@ let parse_args () =
-e, --echo Just parse and pretty-print, no optimizations
\n
\
-e, --echo Just parse and pretty-print, no optimizations
\n
\
\n
\
\n
\
Formatting options:
\n
\
Formatting options:
\n
\
-
-sort
Sort declarations in each selector group
\n
\
-
r, --sort
Sort declarations in each selector group
\n
\
"
"
in
in
...
@@ -66,7 +66,7 @@ let parse_args () =
...
@@ -66,7 +66,7 @@ let parse_args () =
handle
{
args
with
simple
=
true
;
shorthands
=
true
;
duplicates
=
true
}
tl
handle
{
args
with
simple
=
true
;
shorthands
=
true
;
duplicates
=
true
}
tl
|
(
"-e"
|
"--echo"
)
::
tl
->
|
(
"-e"
|
"--echo"
)
::
tl
->
handle
{
args
with
echo
=
true
}
tl
handle
{
args
with
echo
=
true
}
tl
|
"--sort"
::
tl
->
|
(
"-r"
|
"--sort"
)
::
tl
->
handle
{
args
with
sort
=
true
}
tl
handle
{
args
with
sort
=
true
}
tl
|
(
"-h"
|
"--help"
)
::
tl
->
|
(
"-h"
|
"--help"
)
::
tl
->
...
@@ -80,6 +80,13 @@ let parse_args () =
...
@@ -80,6 +80,13 @@ let parse_args () =
|
"-o"
::
filename
::
tl
->
|
"-o"
::
filename
::
tl
->
handle
{
args
with
outfile
=
Some
filename
}
tl
handle
{
args
with
outfile
=
Some
filename
}
tl
|
arg
::
tl
when
String
.
length
arg
>
1
&&
arg
.
[
0
]
=
'
-
'
&&
arg
.
[
1
]
<>
'
-
'
->
let
rec
handle_opts
args
=
function
|
i
when
i
=
String
.
length
arg
->
args
|
i
->
handle_opts
(
handle
args
[
"-"
^
String
.
make
1
arg
.
[
i
]])
(
i
+
1
)
in
handle_opts
args
1
|
arg
::
tl
when
arg
.
[
0
]
=
'
-
'
->
|
arg
::
tl
when
arg
.
[
0
]
=
'
-
'
->
prerr_string
usage
;
prerr_string
usage
;
raise
(
Failure
(
"unknown option "
^
arg
))
raise
(
Failure
(
"unknown option "
^
arg
))
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment