twig icon indicating copy to clipboard operation
twig copied to clipboard

`twig $property` causes accidental property setting

Open ljharb opened this issue 11 years ago • 2 comments

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.

ljharb avatar Sep 02 '13 01:09 ljharb

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.

rondevera avatar Sep 02 '13 22:09 rondevera

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.

ljharb avatar Sep 03 '13 00:09 ljharb