Skip to content
Discussion options

You must be logged in to vote

The only way I can think of to do this now, is by abusing the default command, private and catch_all for good measure:

name: cli
help: Sample application
version: 0.1.0

commands:
- name: __dummy
  private: true
  default: force
  catch_all: true   # <== "./cli anything unrecognized" will also print nothing

- name: download
  alias: d
  help: Download a file

- name: upload
  alias: u
  help: Upload a file

and in the dummy command code:

# noop
:

Since this is not at all a common practice to have a CLI output nothing, there is no natural way to do it in bashly.
If you explain your use case, we can discuss more to see if it needs a non hacky solution.

Replies: 3 comments 3 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by wols
Comment options

You must be logged in to vote
3 replies
@DannyBen
Comment options

@wols
Comment options

@DannyBen
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants