-
Notifications
You must be signed in to change notification settings - Fork 664
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
Add unalias --all
#2615
Add unalias --all
#2615
Conversation
Codecov Report
@@ Coverage Diff @@
## main #2615 +/- ##
==========================================
+ Coverage 86.14% 86.46% +0.32%
==========================================
Files 217 217
Lines 10794 10810 +16
==========================================
+ Hits 9298 9347 +49
+ Misses 1496 1463 -33
Continue to review full report at Codecov.
|
Now, `unalias` accepts the `--all` parameter, as well as many aliases.
71096c7
to
99eaeed
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Works, well, thanks! Just some comments inline to address.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, almost there!
One thing I found is that the same alias is allowed to be entered multiple times and then the following error is shown:
Warning: 'No such file or directory' when removing alias script for mp-ls
IMO, duplicate aliases should just be ignored and treated as a single alias.
Also, and I don't know if it's really a big deal if we handle duplicate aliases like I propose above, but the unalias
bash completion will show the same alias as an alias to choose even if it's already selected in the command line.
This way, we avoid repetitions in the list of alias to remove, thus eliminating the repeated removal of alias scripts.
Thanks! As for the repeated elements in the arguments, now I store them in an I'll see what can be done with the completions (I implemented something similar for network interfaces so far). |
Done the change in bash completions. Now, each alias is suggested only once. This can be refactored in the future and be reused in commands on which we don't want to repeat (and to avoid repeating options like |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, great, thanks!
bors merge
2615: Add `unalias --all` r=townsend2010 a=luis4a0 This PR adds the argument `--all` to the `unalias` command. It also makes `unalias` capable to remove various alias at once. Addresses #2298. Co-authored-by: Luis Peñaranda <[email protected]>
Build failed: |
bors retry |
2615: Add `unalias --all` r=townsend2010 a=luis4a0 This PR adds the argument `--all` to the `unalias` command. It also makes `unalias` capable to remove various alias at once. Addresses #2298. Co-authored-by: Luis Peñaranda <[email protected]>
Build failed: |
Ok, let's try one more time... bors retry |
This PR adds the argument
--all
to theunalias
command. It also makesunalias
capable to remove various alias at once.Addresses #2298.