It depends on your taste.
Unix convention is that commands have 2 forms: long and short (one character). To indicate long form we use 2 dashes --. For example --install
. Short form is marked with one dash, e.g. -i
.
But there is no rules without exceptions. For example command line option of java itself do not follow this convention: -cp
and -classpath
mean the same and both are marked with one dash only. -version
does not have short alias etc.
Slashes are used in windows applications.
I as a java developer prefer to use platform independent conventions (dashes). Moreover various libraries (like cli from jakarta project) supports dashes, so it is easier to implement.