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
Continuing after #313, would it be possible to add support for shell-style expansion of ~ or $(HOME) variables in the
path to diff-highlight in tigrc?
For example when I set:
set diff-highlight = ~/.config/git/diff-highlight
tig cannot find the diff-highlight program. It needs the expanded absolute path to find it or find it in $PATH.
The reason I ask if this is possible is I don't want to change my $PATH from the default and do not want to have root access to put diff-highlight somewhere in system-wide $PATH.
I checked and git itself can expand the program paths set in [pager] section of git config. So this might not be a bad idea after all.
Cheers.
The text was updated successfully, but these errors were encountered:
Since 2.4.0 (f49fc7c), Tig will find diff-highlight even if it is not in the PATH, when it is installed at the default location in git contrib.
If that doesn't help, enabling ~ expansion wouldn't take much work either:
diff --git a/src/apps.c b/src/apps.c
index 28a4ac0..f25d41b 100644
--- a/src/apps.c+++ b/src/apps.c@@ -60,6 +60,9 @@ app_diff_highlight_path_search(char *dest, size_t destlen, const char *query)
if (!query || !*query)
return false;
+ if (strchr(query, '~'))+ return path_expand(dest, destlen, query);+
if (strchr(query, '/')) {
/* can only be interpreted as a fully qualified path */
string_ncopy_do(dest, destlen, query, strlen(query));
Continuing after #313, would it be possible to add support for shell-style expansion of
~
or$(HOME)
variables in thepath to
diff-highlight
in tigrc?For example when I set:
tig cannot find the
diff-highlight
program. It needs the expanded absolute path to find it or find it in $PATH.The reason I ask if this is possible is I don't want to change my $PATH from the default and do not want to have root access to put
diff-highlight
somewhere in system-wide$PATH
.I checked and git itself can expand the program paths set in
[pager]
section of git config. So this might not be a bad idea after all.Cheers.
The text was updated successfully, but these errors were encountered: