Skip to content

bin/xbps-query: improve argument parsing#588

Merged
Duncaen merged 2 commits intovoid-linux:masterfrom
classabbyamp:query/argparse
Jan 21, 2025
Merged

bin/xbps-query: improve argument parsing#588
Duncaen merged 2 commits intovoid-linux:masterfrom
classabbyamp:query/argparse

Conversation

@classabbyamp
Copy link
Member

makes the behaviour of the -R/--repository flags match what xbps-install et al. do, namely -R <repo> and --repository <repo> now work. Existing behaviours are preserved.

allows PKG argument to appear anywhere in argv for more flexible argument parsing. This is now a valid command, for example:

xbps-query -Rx --fulldeptree foo

This also improves some error messages instead of just printing the usage() naïvely.

@classabbyamp classabbyamp force-pushed the query/argparse branch 5 times, most recently from 719564c to 0622405 Compare March 1, 2024 23:54
this lets things be a bit more flexible for users, for example:
xbps-query -Rx --fulldeptree foo is now allowed
this allows --repository <repo> instead of --repository=<repo>
@Duncaen Duncaen merged commit 433634f into void-linux:master Jan 21, 2025
6 checks passed
@classabbyamp classabbyamp deleted the query/argparse branch January 21, 2025 14:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants