Discuss the reliability of state variables
liangkarl opened this issue · comments
Background
I have used tig
for a long time and I think tig
is a really great tool compared to other similar TUI git wrappers. Due to the limitation of the tig
functions, usually I would created some scripts for my customized behavior that depends on those state variables. I think it's fine for me to write these scripts, as it's just like what tmux
did that tmux
opens lots of basic variables or options for external plugins instead of implementing many fasion features itself. I don't think tmux
has a bad design. However, just like what I did to tmux
config, when I try to customize my tig
profile, sometimes I'm annoyed with the state variables in tig
as they are not reliable and make the external script hard to get right results.
Examples
I spend lots of time to think about the workaround to get the proper information where the tig
light bar(cursor line?) located. For example, if there is an external command tig path/to/foo
triggered and I want to get the path path/to/foo
in tig
, it would be pretty hard for me as %(directory)
may not return the correct result.
Or, if I create an branch foo
and I delete it immediately, the %(branch)
variable would still be foo
if the light bar has already moved to other commits where there are no branches created.
I have a lot of similar experience that some of them could be avoid but some of them not.
Suggestions
I don't expect tig
could have many features, but I hope the options and variables of tig
could be reliable. If we the users could implement features based on the reliable tig
options and variables, then I think it would be really helpful to reduce the issue tickets for sure. ^ ^"