[pacman-dev] [PATCH 1/2] Add --assume-installed to pacman --help
Signed-off-by: Florian Pritz <bluewind@xinu.at> --- src/pacman/pacman.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/pacman/pacman.c b/src/pacman/pacman.c index 3d1406b..6161048 100644 --- a/src/pacman/pacman.c +++ b/src/pacman/pacman.c @@ -185,6 +185,8 @@ static void usage(int op, const char * const myname) /* pass through */ case PM_OP_REMOVE: addlist(_(" -d, --nodeps skip dependency version checks (-dd to skip all checks)\n")); + addlist(_(" --assume-installed <package=version>\n" + " add a virtual package to satisfy dependencies\n")); addlist(_(" --dbonly only modify database entries, not package files\n")); addlist(_(" --noprogressbar do not show a progress bar when downloading files\n")); addlist(_(" --noscriptlet do not execute the install scriptlet if one exists\n")); -- 2.1.3
Signed-off-by: Florian Pritz <bluewind@xinu.at> --- I tested the zsh completion, didn't test bash. contrib/bash_completion.in | 6 +++--- contrib/zsh_completion.in | 2 ++ 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/contrib/bash_completion.in b/contrib/bash_completion.in index 519aa6d..1fca25b 100644 --- a/contrib/bash_completion.in +++ b/contrib/bash_completion.in @@ -102,11 +102,11 @@ _pacman() { database=('asdeps asexplicit') query=('changelog check deps explicit file foreign groups info list owns search unrequired upgrades' 'c e g i k l m o p s t u') - remove=('cascade dbonly nodeps nosave print recursive unneeded' 'c n p s u') + remove=('cascade dbonly nodeps assume-installed nosave print recursive unneeded' 'c n p s u') sync=('asdeps asexplicit clean dbonly downloadonly force groups ignore ignoregroup - info list needed nodeps print refresh recursive search sysupgrade' + info list needed nodeps assume-installed print refresh recursive search sysupgrade' 'c g i l p s u w y') - upgrade=('asdeps asexplicit force needed nodeps print recursive' 'p') + upgrade=('asdeps asexplicit force needed nodeps assume-installed print recursive' 'p') common=('arch cachedir color config dbpath debug help logfile noconfirm noprogressbar noscriptlet quiet root verbose' 'b d h q r v') core=('database help query remove sync upgrade version' 'D Q R S U V h') diff --git a/contrib/zsh_completion.in b/contrib/zsh_completion.in index 67aa40a..7ebf7f4 100644 --- a/contrib/zsh_completion.in +++ b/contrib/zsh_completion.in @@ -70,6 +70,7 @@ _pacman_opts_query_modifiers=( _pacman_opts_remove=( {-c,--cascade}'[Remove all dependent packages]' {*-d,*--nodeps}'[Skip dependency checks]' + '*--assume-installed[Add virtual package to satisfy dependencies]' {-n,--nosave}'[Remove protected configuration files]' {\*-s,\*--recursive}'[Remove dependencies not required by other packages]' '--dbonly[Only remove database entry, do not remove files]' @@ -96,6 +97,7 @@ _pacman_opts_sync_actions=( # options for passing to _arguments: options for --sync command _pacman_opts_sync_modifiers=( {\*-d,\*--nodeps}'[Skip dependency checks]' + '*--assume-installed[Add virtual package to satisfy dependencies]' {\*-i,\*--info}'[View package information]' {-l,--list}'[List all packages in a repository]' {-p,--print}'[Print download URIs for each package to be installed]' -- 2.1.3
On 11/04/14 at 08:40pm, Florian Pritz wrote:
Signed-off-by: Florian Pritz <bluewind@xinu.at> ---
I tested the zsh completion, didn't test bash.
contrib/bash_completion.in | 6 +++--- contrib/zsh_completion.in | 2 ++ 2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/contrib/bash_completion.in b/contrib/bash_completion.in index 519aa6d..1fca25b 100644 --- a/contrib/bash_completion.in +++ b/contrib/bash_completion.in @@ -102,11 +102,11 @@ _pacman() { database=('asdeps asexplicit') query=('changelog check deps explicit file foreign groups info list owns search unrequired upgrades' 'c e g i k l m o p s t u') - remove=('cascade dbonly nodeps nosave print recursive unneeded' 'c n p s u') + remove=('cascade dbonly nodeps assume-installed nosave print recursive unneeded' 'c n p s u') sync=('asdeps asexplicit clean dbonly downloadonly force groups ignore ignoregroup - info list needed nodeps print refresh recursive search sysupgrade' + info list needed nodeps assume-installed print refresh recursive search sysupgrade' 'c g i l p s u w y') - upgrade=('asdeps asexplicit force needed nodeps print recursive' 'p') + upgrade=('asdeps asexplicit force needed nodeps assume-installed print recursive' 'p') common=('arch cachedir color config dbpath debug help logfile noconfirm noprogressbar noscriptlet quiet root verbose' 'b d h q r v') core=('database help query remove sync upgrade version' 'D Q R S U V h') diff --git a/contrib/zsh_completion.in b/contrib/zsh_completion.in index 67aa40a..7ebf7f4 100644 --- a/contrib/zsh_completion.in +++ b/contrib/zsh_completion.in @@ -70,6 +70,7 @@ _pacman_opts_query_modifiers=( _pacman_opts_remove=( {-c,--cascade}'[Remove all dependent packages]' {*-d,*--nodeps}'[Skip dependency checks]' + '*--assume-installed[Add virtual package to satisfy dependencies]' {-n,--nosave}'[Remove protected configuration files]' {\*-s,\*--recursive}'[Remove dependencies not required by other packages]' '--dbonly[Only remove database entry, do not remove files]' @@ -96,6 +97,7 @@ _pacman_opts_sync_actions=( # options for passing to _arguments: options for --sync command _pacman_opts_sync_modifiers=( {\*-d,\*--nodeps}'[Skip dependency checks]' + '*--assume-installed[Add virtual package to satisfy dependencies]' {\*-i,\*--info}'[View package information]' {-l,--list}'[List all packages in a repository]' {-p,--print}'[Print download URIs for each package to be installed]'
You missed --upgrade completion for zsh.
Signed-off-by: Florian Pritz <bluewind@xinu.at> --- v2: Also add it to -U in zsh. Only issue I see is that it completes a package name if you complete "--assume-installed <tab>" which doesn't make a whole lot of sense. contrib/bash_completion.in | 6 +++--- contrib/zsh_completion.in | 3 +++ 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/contrib/bash_completion.in b/contrib/bash_completion.in index 519aa6d..1fca25b 100644 --- a/contrib/bash_completion.in +++ b/contrib/bash_completion.in @@ -102,11 +102,11 @@ _pacman() { database=('asdeps asexplicit') query=('changelog check deps explicit file foreign groups info list owns search unrequired upgrades' 'c e g i k l m o p s t u') - remove=('cascade dbonly nodeps nosave print recursive unneeded' 'c n p s u') + remove=('cascade dbonly nodeps assume-installed nosave print recursive unneeded' 'c n p s u') sync=('asdeps asexplicit clean dbonly downloadonly force groups ignore ignoregroup - info list needed nodeps print refresh recursive search sysupgrade' + info list needed nodeps assume-installed print refresh recursive search sysupgrade' 'c g i l p s u w y') - upgrade=('asdeps asexplicit force needed nodeps print recursive' 'p') + upgrade=('asdeps asexplicit force needed nodeps assume-installed print recursive' 'p') common=('arch cachedir color config dbpath debug help logfile noconfirm noprogressbar noscriptlet quiet root verbose' 'b d h q r v') core=('database help query remove sync upgrade version' 'D Q R S U V h') diff --git a/contrib/zsh_completion.in b/contrib/zsh_completion.in index 67aa40a..f2ff7c8 100644 --- a/contrib/zsh_completion.in +++ b/contrib/zsh_completion.in @@ -37,6 +37,7 @@ _pacman_opts_common=( _pacman_opts_pkgfile=( '*-d[Skip dependency checks]' '*--nodeps[Skip dependency checks]' + '*--assume-installed[Add virtual package to satisfy dependencies]' '--dbonly[Only remove database entry, do not remove files]' '--force[Overwrite conflicting files]' '--needed[Do not reinstall up to date packages]' @@ -70,6 +71,7 @@ _pacman_opts_query_modifiers=( _pacman_opts_remove=( {-c,--cascade}'[Remove all dependent packages]' {*-d,*--nodeps}'[Skip dependency checks]' + '*--assume-installed[Add virtual package to satisfy dependencies]' {-n,--nosave}'[Remove protected configuration files]' {\*-s,\*--recursive}'[Remove dependencies not required by other packages]' '--dbonly[Only remove database entry, do not remove files]' @@ -96,6 +98,7 @@ _pacman_opts_sync_actions=( # options for passing to _arguments: options for --sync command _pacman_opts_sync_modifiers=( {\*-d,\*--nodeps}'[Skip dependency checks]' + '*--assume-installed[Add virtual package to satisfy dependencies]' {\*-i,\*--info}'[View package information]' {-l,--list}'[List all packages in a repository]' {-p,--print}'[Print download URIs for each package to be installed]' -- 2.1.3
participants (2)
-
Andrew Gregory
-
Florian Pritz