Scoop: alias for uninstall can't work

Created on 19 Nov 2020  路  3Comments  路  Source: lukesampson/scoop

scoop alias add add 'scoop install $args' 'alias for install' # add alias for install
scoop add A B C # all install success
scoop alias add rm 'scoop uninstall $args' 'alias for uninstall' # add alias for uninstall
scoop rm A B C # only A is uninstalled.

All 3 comments

i think "rm" or "remove" could be a built in alias for uninstall

The issue here is that in your alias the $args are passed as one arg.

The only reason this works for install is because of a quirk of how the software determines dependancy install order.

To fix this, amend your alias to use splatting, using @args instead of $args

You should do the same for your install alias because otherwise it is failing a number of tests for every requested install after the first.

scoop alias add rm 'scoop uninstall @args' 'alias for uninstall'

@devon-badman useful for me.

Was this page helpful?
0 / 5 - 0 ratings