-
-
Notifications
You must be signed in to change notification settings - Fork 74
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Limit gita ll
column widths
#264
Comments
maybe the easy solution is to add an option for btw, one can also change repo name with |
Yes a command line flag or a config option would be nice. As mentioned I don't know how easy it would be to support this if branch name + status are treated as one string, which was the case when I last checked. But looking at the current master, this seems to be separated now?
What does this do? The help text "rename the chosen repo" doesn't go into details. I guess it changes the name in the second column of In both cases, having the names truncated of course assumes that the part of the name that is displayed is still unique and informative, but I guess here a configurable length will cover most use cases. Renaming (setting an alias?) with |
please try 0.16.7.2 |
Thanks a lot! I tested this feature and would like to give some feedback. $ gita info
In use: branch,commit_msg,commit_time
Unused: branch_name,path
$ cat ~/.config/gita/layout.csv
branch,symbols,branch_name,commit_msg,commit_time,path
19,5,27,0,0,30
With the above settings, I get $ gita ll
very_very_very_very_long_repo_name_why_not main [] Commit mesage here (4 weeks ago)
a_repo long-branch-name-h... [] Commit mesage here (4 weeks ago)
another_repo master [] Commit mesage here, and some more long long text (4 weeks ago) The |
Repo name is not an info item since it has to be displayed. It is out of the truncator mechanism currently https://github.com/nosarthur/gita/blob/master/gita/utils.py#L419 |
OK I see, thanks a lot. |
Hi
Thanks for this project.
I have a question related to column widths in the
gita ll
output, using the currentmaster
(a5ba6fe).Is there a way to configure a max width per column?
I have an experimental branch based off a rather old master. There I just hard-coded some width quickly. I had to rewrite some code to separate the branch name and the branch state in order to apply the string length truncation only to the branch name. Not sure if this is still the case in the current code. I used
tabulate
to help with the column printing, which looks like this:Separating branch name and state made it also possible to support a
-d/--dirty
flag. Not sure if there is an equivalent feature inmaster
. I also tried to userich
for table layout but that didn't work that well, probably because of the color escape codes, but that's just a guess. Anyway that branch is rather different from currentmaster
by now and lacks nice features such as concurrent execution. Since it is difficult to rebase that branch onto currentmaster
, I was wondering if there is a way to truncate the column widths in the current code. Thanks a lot!The text was updated successfully, but these errors were encountered: