matchai / spacefish

🚀🐟 The fish shell prompt for astronauts
https://spacefish.matchai.dev
MIT License
963 stars 77 forks source link

Use prompt_pwd for shorten dir section #210

Closed tasmo closed 4 years ago

tasmo commented 4 years ago

Feature Request

Is your feature request related to a problem? Please describe. Fish has the very nice function for prompts to show a shortened path instead of full sub directory names.

Describe the solution you'd like Truncating the path is a nice option. Personally I like Fish's builtin way to shorten the directory path in prompts.

echo $PWD # or just (pwd)
/home/$USER/.local/share/omf/lib/completions

__sf_section_dir
in omf/lib/completions

prompt_pwd
~/.l/s/o/l/completions

Describe alternatives you've considered Instead of using pwd or $PWD it would be possible to use prompt_pwd.

matchai commented 4 years ago

Hi @tasmo. Thank you for opening an issue. Unfortunately, spacefish is no longer under active development, but I suggest you take a look at its successor https://github.com/starship/starship, which has similar fish directory truncation built-in, which I believe should address this feature request.

That said, if someone comes around with a PR to fix this bug, I'll gladly review and merge it. 😄