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

Feature request: allow options before the command #44

Open
esoel opened this issue May 31, 2022 · 2 comments
Open

Feature request: allow options before the command #44

esoel opened this issue May 31, 2022 · 2 comments

Comments

@esoel
Copy link

esoel commented May 31, 2022

Please allow options before the command so that common parameters (eg --db PATH) can be embedded in an alias.

@jvirkki
Copy link
Owner

jvirkki commented Jun 2, 2022

Interesting use case. The command parsing code is all machine-generated code so to change it I need to change the code generator. I can look into that some day but not anytime soon.

Meanwhile, you could achieve the desired behavior with a shell script or shell function. For example, in zsh this function will define an alias "dupdalias" which will behave as described:

dupdalias() {
    DUPDCOMMAND=$1
    argv[1]=()
    dupd $DUPDCOMMAND --db /tmp/dupd.database $argv
}

@esoel
Copy link
Author

esoel commented Jul 18, 2022

Thanks

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

No branches or pull requests

2 participants