You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
This is not related to a problem but that'd be a nice to have.
Command aliases would be a cool feature indeed. Silly example, for illustration purpose: I could be typing chezmoi s instead of chezmoi status --verbose.
The only alternative I found is to create a script and use the chezmoi-${COMMAND} facility. It works, but it is a little cumbersome for a mere alias and it's not portable across operating systems and/or shells:
$ alias'chezmoi s'='chezmoi status --verbose'-bash: alias: `chezmoi s': invalid alias name
Additional context
The alternative I suggest works for me, using bash on Linux. I am not sure bash is provided on Mac OS anymore and I guess a bash script won't work on Windows.
The text was updated successfully, but these errors were encountered:
I'd like to add this, but it is not easy to do. chezmoi uses github.com/spf13/cobra for command line parsing, and sadly cobra does not support this kind of alias.
Is your feature request related to a problem? Please describe.
This is not related to a problem but that'd be a nice to have.
Command aliases would be a cool feature indeed. Silly example, for illustration purpose: I could be typing
chezmoi s
instead ofchezmoi status --verbose
.In git for example, this is achieved as follows:
$ git config alias.s 'status --verbose'
Describe the solution you'd like
An alias could be set like this:
$ chezmoi alias s 'status --verbose'
The command
chezmoi alias
without arguments could display a list of the current aliases.Another way of setting up an alias could be to put entries directly in the config file:
Describe alternatives you've considered
The only alternative I found is to create a script and use the chezmoi-${COMMAND} facility. It works, but it is a little cumbersome for a mere alias and it's not portable across operating systems and/or shells:
NOTE: setting up a bash alias doesn't work:
Additional context
The alternative I suggest works for me, using bash on Linux. I am not sure bash is provided on Mac OS anymore and I guess a bash script won't work on Windows.
The text was updated successfully, but these errors were encountered: