Simple CLI invocation with "default" options
See original GitHub issueHi,
Simple CLI commands like droid file.jpg
or droid directory/
fail with the error “Incorrect command line syntax: No command line options specified” because some options are not optional at all. Is it just me or wouldn’t one expect that this just works by identifying the given files/directories (recursively) with the latest available (container) signature file? To me this seems like the “default” behavior for quick command line usage.
Personally, I work around this by tweaking your droid.sh file a little so that it accepts a CLI invocation like this. Would you possibly like to add this feature to DROID? In this case I will open a pull request.
Have a nice weekend, Martin
Issue Analytics
- State:
- Created 3 years ago
- Comments:7 (3 by maintainers)
Top Results From Across the Web
invoke — AWS CLI 1.27.29 Command Reference
Choose from the following options. RequestResponse (default) – Invoke the function synchronously. Keep the connection open until the function returns a response ...
Read more >Invocation basics - Invoke documentation - PyInvoke
Invoke's command line invocation utilizes traditional style command-line flags ... Boolean options are simple flags with no arguments, which turn the Python ...
Read more >gnutls-cli Invocation (GnuTLS 3.7.8)
This is the “inline commands of the form ^<cmd>^” option. Enable inline commands of the form ^<cmd>^. The inline commands are expected to...
Read more >Options · CLI11 Tutorial
Options. Simple options. The most versatile addition to a command line program ... If you want CLI11 to display your default value, you...
Read more >picocli - a mighty tiny command line interface
A command may be invoked with the @file argument, like this: ... The simplest way to create a multi-valued option is to declare...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I’ve now added this to my new command line code. If you don’t specify any other top level arguments, it will default to just identifying files, and output the results to the console by default as CSV:
droid {file1} {file2} etc…
You can still specify other standard options to recurse into folder as normal, or to output to a file:
droid {file1} {folder1} -R -o “/home/user/scans/results.csv”
Thanks Martin. My preference would be to do it in the command line and also assess the impact on existing.
You are quite right about being cautious.
Thanks once again for identifying this, we would take it up as per the priorities of existing issues.
Regards, –Saurabh