简体   繁体   English

如何在tig视图中显示完整文件路径

[英]How to display full file path in tig view

I use tig to view what's changed. 我用tig来查看改变了什么。 But how to show the full path in the changed file list instead of only part of long file path? 但是如何在更改的文件列表中显示完整路径而不是仅显示长文件路径的一部分?

for example, I want to see the full path of SpecialAnswList.java, instead of the ... prefix. 例如,我想看到SpecialAnswList.java的完整路径,而不是...前缀。

---
   │  .../ui/component/SpeciaAnswList.java       | 44 ++++++++--------------
   │  1 file changed, 16 insertions(+), 28 deletions(-) 

Since Tig's uses git-show(1) to display diffs you can use the --stat diff option. 由于Tig使用git-show(1)来显示差异,因此您可以使用--stat diff选项。 For example: 例如:

$ tig --stat=200,180

Unfortunately, there is no option to scale it by a percentage, so you have to do that manually. 不幸的是,没有选项可以按百分比进行缩放,因此您必须手动执行此操作。

Here's the documentation for the option: 这是该选项的文档:

--stat[=<width>[,<name-width>[,<count>]]]

       Generate a diffstat. By default, as much space as necessary will be used for the
       filename part, and the rest for the graph part. Maximum width defaults to terminal
       width, or 80 columns if not connected to a terminal, and can be overridden by
       <width>. The width of the filename part can be limited by giving another width
       <name-width> after a comma. The width of the graph part can be limited by using
       --stat-graph-width=<width> (affects all commands generating a stat graph) or by
       setting diff.statGraphWidth=<width> (does not affect git format-patch). By giving a
       third parameter <count>, you can limit the output to the first <count> lines,
       followed by ...  if there are more.

       These parameters can also be set individually with --stat-width=<width>,
       --stat-name-width=<name-width> and --stat-count=<count>.

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM