Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add support for Hidden and Private Commands #64

Merged
merged 3 commits into from
Dec 4, 2022

Conversation

TekWizely
Copy link
Owner

@TekWizely TekWizely commented Nov 28, 2022

You can mark a command as hidden with '.':

.hidden:
    echo "This command is hidden"
  • Can be invoked by command config RUN actions
    • RUN actions do not need to use '.'
  • Will not show in CLI list of available commands
  • Can still be invoked via CLI using '.name'

You can mark a command as private with '!':

!private:
    echo "This command is private"
  • Can only be invoked by command config RUN actions
    • RUN actions do not need to use '!'
  • Will not show in CLI list of available commands
  • Cannot be invoked from CLI

TODO

  • Update Docs

You can mark a command as hidden with '@':

   @hidden:
       echo "This command is hidden"

* Can be invoked by command config RUN actions
  * RUN actions do not need to use '@'
* Will not show in CLI list of available commands
* Can still be invoked via CLI using '@name'

You can mark a command as private with '!':

   !private:
       echo "This command is private"

* Can only be invoked by command config RUN actions
  * RUN actions do not need to use '!'
* Will not show in CLI list of available commands
* Cannot be invoked from CLI
@TekWizely
Copy link
Owner Author

To anyone following along,
I initially used @ for hidden as I feel users of make already associate it with a form of suppression, but grinding on it more, I don't love it for this use case.

I'm going to re-work this to use . as the hidden indicator:

  • It is more globally associated with the idea of 'hidden'
  • It pairs rather nicely with ! for private.

ie:

.hidden
!private

I'll be updating the PR shortly.

Changes '@' to '.' for hidden commands.

Updates README.md with a small section on hidden/private commands.

misc: Code fixes(?) that hopefully don't break anything
@nikolay
Copy link

nikolay commented Dec 2, 2022

This is really nice, and the syntax is intuitive! Thank you!

@TekWizely
Copy link
Owner Author

Hey @nikolay I always appreciate your input, thanks ! merging now ...

@TekWizely TekWizely merged commit ef32451 into master Dec 4, 2022
@TekWizely TekWizely deleted the feat/hidden-cmds branch December 4, 2022 22:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants