dupd icon indicating copy to clipboard operation
dupd copied to clipboard

Feature request: allow options before the command

Open esoel opened this issue 3 years ago • 2 comments

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

esoel avatar May 31 '22 16:05 esoel

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
}

jvirkki avatar Jun 02 '22 06:06 jvirkki

Thanks

esoel avatar Jul 18 '22 19:07 esoel