powerline-shell icon indicating copy to clipboard operation
powerline-shell copied to clipboard

Config options added to truncate git branch names

Open shervinsahba opened this issue 4 years ago • 3 comments

This is related to #438 . I added two options to truncate git branch names to use with config.json.

  "git": {
      "master_is_M": true,
      "branch_max_length": 5
  }

The first abbreviates master to M. The second sets a maximum number of characters to display for the branch name. Names past that length are truncated and appended with the unicode ellipsis.

I didn't look at bzr or other vc systems, so I kept this git specific.

shervinsahba avatar Oct 29 '19 04:10 shervinsahba

Any action on this? Our branch names are automatically generated using the ticket title and often end up exceeding the width of the terminal, this would be a very welcome feature addition for anyone in a similar situation.

minelminel avatar Jan 27 '21 21:01 minelminel

I haven't seen much action on this project in the last two years despite its popularity, unfortunately.

shervinsahba avatar Feb 05 '21 21:02 shervinsahba

Why isn't this PR getting any love?

I need to be able to do this and I would rather not have to hack powerline.

This is what the shell looks like, it's not cool.

image

jeffabailey avatar Nov 17 '21 17:11 jeffabailey