feat: add u as alias for update command#9163
Conversation
14c8a21 to
8bce7f3
Compare
|
I would love that. Always running in the same problem and would really like to have that additional shortcut. |
|
second this, a mitigation to RSI as well. |
|
I'm not sure about this. My brain tells me |
|
I think this is a great idea! I love using the shorthands. I also do not believe that the argument about u standing for uninstall to be a counter. Uninstall is a destructive action while the other shorthands are constructive actions. I understand one could argue that an update can change contracts but to me its not the same as a full on removal. So in that sense I am actually happy that uninstall does not come with a shorthand. |
|
Actually a regular thing I run into. Seems like a neat addition which wouldn't hurt to add :) |
|
What about |
Did you read the discussion? This was already addressed. |
|
Ah yes I missed the very end there, sorry |
|
I think the need here is straightforward: Today, As others have already mentioned, I do not think "someone might imagine another meaning for For example, the This shows that npm has already been willing to optimize for convenience where the tradeoff is low. Against that backdrop, |
|
not sure where CI went on this, closing and reopening to try and trigger it... I think you make good points. I'm good with this |
|
@Ausoj Will need an |
|
@owlstronaut done - 2fd83ac |
## Summary Adds `u` as a short alias for the `update` command, making it consistent with `i` for `install`. ## Motivation `npm i` is the canonical short form for `npm install` — the most commonly used npm command. However, `npm update` lacks an equivalent single-character alias. The existing `npm up` alias works, but feels inconsistent compared to `i`. Adding `u` makes the CLI more ergonomic and intuitive: ```sh npm i # install ✅ already exists npm u # update ✅ this PR ``` ## Changes - Added `u: 'update'` alias in `lib/utils/cmd-list.js`, grouped alongside the existing `up: 'update'` alias ## Notes - `u` is not currently used by any other alias or command, so there is no conflict - Follows the same pattern as other single-character aliases (`i`, `r`, `t`, `c`, `s`, `v`, `x`) (cherry picked from commit db7c1f8)
|
🎉 Backport to |
Summary
Adds
uas a short alias for theupdatecommand, making it consistent withiforinstall.Motivation
npm iis the canonical short form fornpm install— the most commonly used npm command. However,npm updatelacks an equivalent single-character alias. The existingnpm upalias works, but feels inconsistent compared toi.Adding
umakes the CLI more ergonomic and intuitive:Changes
u: 'update'alias inlib/utils/cmd-list.js, grouped alongside the existingup: 'update'aliasNotes
uis not currently used by any other alias or command, so there is no conflicti,r,t,c,s,v,x)