-
Notifications
You must be signed in to change notification settings - Fork 226
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
Feature suggest: prettify long pipenv names #174
Comments
+1 on this, speaking as someone who only just installed fish shell (and fisher, and bobthefish). The way I did it was similar, but instead of changing the output of the [ "$theme_display_virtualenv" = 'glyph' -o -z "$VIRTUAL_ENV" -a -z "$CONDA_DEFAULT_ENV" ]; and return This causes an early return from the function after the glyph has been printed, but before the virtualenv/pipenv name is printed. Instead of adding a separate variable for this, the new line adds a third option to the Being a newbie, I'm not sure how well or badly this idea fits with the overall bobthefish config philosophy, though there are a couple of other |
Are Pipenv virtualenv names always the same as the project directory they're in? If so, it really seems like this should be the default behavior for Pipenv. |
They virtualenv's themselves aren't always located in the project directory - by default it puts them all in So yes, I agree this should probably be the default :) |
+1 |
@bobthecow great, thanks for new feature! I've given it a test but unfortunately haven't been able to get it to work with pipenv. configI originally suggested this one when I was using macOS as my daily driver, but I've jumped ship to Windows for now. In order to give it a go I dug out a Raspberry Pi with a clean raspbian lite install and have completed the following steps:
resultsLong prompts: Here's a big ol' recording of it all: Side note, it looks like pipenv truncates virtualenvs to 44 chars, then shoves a hash on the end. Sample
|
Gotcha. I was accounting for the hash, but not the truncation. I’m not sure why the short virtualenv wasn’t working though. Could you get the output of |
Sure thing. From inside
|
Pipenv can produce some bananas long virtualenv names (see below), so to keep the prompt a usable length I modified line 693 of fish_prompt.fish to naively just print the glyph, as I tend to only care about whether pipenv is active. Would it be possible to suggest that bobthefish has a flag for shortening pipenv names in a similar manner to long directory paths, or a flag to omit the name entirely?
I would like to give this a shot myself, but I'm afraid I'm a complete novice with writing scripts for fish, so I'm struggling to see how I might implement the flags.
Here are the example prompts:
Thanks for the wonderful theme - it's made the terminal a much nicer place to live 😁
The text was updated successfully, but these errors were encountered: