Compress $HOME into ~ in prompt#8173
Compress $HOME into ~ in prompt#8173fdncred merged 2 commits intonushell:mainfrom SUPERCILEX:patch-1
Conversation
|
Sidenote: the code is unnecessarily convoluted because I couldn't find a way to do prefix/suffix replacement. It'd be cool if that was a thing. |
How would prefix or suffix replacement work? Do you have an example? |
|
Hmmm, I guess I was thinking |
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #8173 +/- ##
==========================================
- Coverage 54.24% 54.20% -0.04%
==========================================
Files 608 608
Lines 99081 99162 +81
==========================================
+ Hits 53747 53753 +6
- Misses 45334 45409 +75
|
|
ya, Thanks for the cleanup of the script. |
This is a follow-up from #8173, which was merged shortly after the 0.76 release. That PR changed `default_env.nu` so that the user's home folder is displayed as `~` in the left prompt. It did so using `get -i`. This PR just rewrites the Nu code from #8173 to use `try`/`catch` instead of `-i`, which will make it easier to remove the `-i` flags from `get` and `select` eventually (see #8379). I would like to merge this before the 0.77 release, so we don't end up with lots of `env.nu` files using `get -i` out in the wild.
No description provided.