twig
twig copied to clipboard
`twig $property` causes accidental property setting
When I try a git shortcut (in my gitconfig) like co
for checkout
, there are a few problems:
- it doesn't perform a checkout
- it sets a property called "co" on the current branch
This issue is that I think twig foo
to set property "foo" is too implicit - twig set foo
would be much clearer, and would allow for helpful error messages and extensions in the root namespace.
Since reading and writing branch properties are two of the core functions of Twig, this usage most likely won't change. For each issue here:
- Falling back to a Git subcommand is discussed in #23.
- Setting a property could involve a prompt if the property doesn't exist yet. This'll get old pretty quickly, though.
A twig-config-opt-in setting to issue a prompt would work well. I use twig for reading properties exponentially more often than setting them, so that wouldn't be troublesome for me.