Skip to content
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 a ! choice meaning confirm all or something like that to straight-remove-unused-repos. #898

Closed
hongyi-zhao opened this issue Dec 7, 2021 · 2 comments
Labels

Comments

@hongyi-zhao
Copy link

hongyi-zhao commented Dec 7, 2021

I noticed that the straight-remove-unused-repos function takes a force argument, which allows me to provide any prefix arg so that it will delete all repos without prompting. One way is to use current-prefix-arg, as shown below:

(let ((current-prefix-arg '(4)))
  (call-interactively #'straight-remove-unused-repos))

But this is a little inconvenient. It seems that one solution is to add a ! choice, meaning confirm all or something like that.

Regards,
HZ

@hongyi-zhao hongyi-zhao changed the title Add a "!" choice meaning "confirm all" or something like that to straight-remove-unused-repos. Add a ! choice meaning confirm all or something like that to straight-remove-unused-repos. Dec 7, 2021
@progfolio
Copy link
Contributor

progfolio commented Dec 7, 2021

Please see: https://www.gnu.org/software/emacs/manual/html_node/emacs/Arguments.html

You can pass the universal argument to the command and force will be non-nil.

And if you wish to use the command in an elisp program you can just pass the force argument you desire:

(straight-remove-unused-repos 'force)

@hongyi-zhao
Copy link
Author

(straight-remove-unused-repos 'force)

Thanks, and it seems that any non-nil argument will do the trick, say, the following ones: t, 'bla, and so on.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

2 participants