Add abbreviations - #1275
Add abbreviations#1275
Conversation
eb1e540 to
64097b7
Compare
|
Hi @fnuttens ! Do you plan to continue working on this? It would be nice to have the abbreviations here 😃 |
|
This PR definitely needs work. Some of the scripts appear to append abbreviations and others just overwrite them entirely. |
64097b7 to
eb8cce5
Compare
|
@DavSanchez I do, yes, it’s just that the last few weeks have been quite busy 🙂 @fdncred oops indeed, this is now fixed! |
|
have you tested the ones with the exclamation point? |
|
@fdncred yes it works as expected! |
eb8cce5 to
f01d8a2
Compare
| } | ||
|
|
||
| export def git_main_branch [] { | ||
| git remote show origin |
There was a problem hiding this comment.
Shouldn't this be
| git remote show origin | |
| ^git remote show origin |
so it calls the external in case someone shadowed this command?
There was a problem hiding this comment.
Sure thing, to be honest this is straight out copied from git aliases 😅
Shouldn’t we keep both implementations exactly the same?
I can totally fix this on both sides if that’s ok with you!
There was a problem hiding this comment.
ya, we should. I'm just saying that sometimes we want to call ^git, the external, and sometimes we want to call git the custom command/alias/module.
|
Thanks! |
Replace the ad-hoc ls-family and curated git abbreviations with the abbreviation modules recently added to nu_scripts (nushell/nu_scripts#1275), sourced alongside the existing nu_scripts aliases. The upstream git set is adopted wholesale: composed abbreviations such as `gstu` expand to text that still relies on the plain aliases, so the alias sources stay. Note the abbreviation files spread the existing $env.config.abbreviations *after* their own keys, which makes nushell error with column_defined_twice on same-named local overrides -- hence the previous local git set (and its gcm divergence) is dropped rather than overridden. Requires a nixpkgs bump whose nu_scripts ships share/nu_scripts/abbreviations/.
Closes #1273