aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Mike Kelly <pioto@pioto.org> 2007-10-12 20:06:59 +0000
committerAvatar Mike Kelly <pioto@pioto.org> 2007-10-12 20:06:59 +0000
commit21d4d118ac68416c7bfe1802a4017a53cce95aa1 (patch)
tree6ee3eeaa68bf87ee11641b4d830801778a08b6f0
parentc32e3eb22ba88851641c6fa8420235dc14ee4da7 (diff)
downloadpaludis-21d4d118ac68416c7bfe1802a4017a53cce95aa1.tar.gz
paludis-21d4d118ac68416c7bfe1802a4017a53cce95aa1.tar.xz
Update bashcomp with a patch from zlin.
-rw-r--r--bash-completion/Makefile.am4
-rw-r--r--bash-completion/accerso73
-rw-r--r--bash-completion/adjutrix6
-rw-r--r--bash-completion/instruo72
-rw-r--r--bash-completion/paludis25
-rw-r--r--bash-completion/qualudis24
-rw-r--r--bash-completion/reconcilio165
7 files changed, 335 insertions, 34 deletions
diff --git a/bash-completion/Makefile.am b/bash-completion/Makefile.am
index e90f498..d2538fc 100644
--- a/bash-completion/Makefile.am
+++ b/bash-completion/Makefile.am
@@ -1,5 +1,7 @@
MAINTAINERCLEANFILES = Makefile.in
-noinst_DATA = paludis adjutrix qualudis contrarius inquisitio
+noinst_DATA = paludis adjutrix qualudis \
+ contrarius inquisitio \
+ accerso instruo reconcilio
EXTRA_DIST = $(noinst_DATA)
built-sources : $(BUILT_SOURCES)
diff --git a/bash-completion/accerso b/bash-completion/accerso
new file mode 100644
index 0000000..d77a3ff
--- /dev/null
+++ b/bash-completion/accerso
@@ -0,0 +1,73 @@
+# Bash completion function for accerso
+# vim: set et sw=4 sts=4 ts=4 ft=sh :
+
+# NOTE: This is still a work in progress, don't expect it to work well or
+# properly right now.
+
+_accerso_get_repodir() {
+ local repodir
+ [[ -f ./profiles/repo_name ]] && repodir=$(readlink -f $(pwd))
+ [[ -z "${repodir}" && -f ../profiles/repo_name ]] \
+ && repodir=$(readlink -f $(pwd)/..)
+ [[ -z "${repodir}" && -f ../../profiles/repo_name ]] \
+ && repodir=$(readlink -f $(pwd)/../..)
+ [[ -z "${repodir}" ]] && return 1
+ echo "${repodir}"
+}
+
+_accerso() {
+ local cur prev opts
+ COMPREPLY=()
+ cur=${COMP_WORDS[COMP_CWORD]}
+ prev=${COMP_WORDS[COMP_CWORD-1]}
+
+ # Figure out what our repository dir is
+ for i in $(seq 0 ${COMP_CWORD}) ; do
+ if [[ ${COMP_WORDS[i]} == "-D" \
+ || ${COMP_WORDS[i]} == "--repository-dir" ]]
+ then
+ repodir=${COMP_WORDS[i+1]}
+ fi
+ done
+ [[ -z "${repodir}" ]] && repodir="$(_accerso_get_repodir)"
+
+ opts="--fetch -f \
+ --version -V \
+ --help -h \
+ --log-level \
+ --no-colour \
+ --no-color \
+ --repository-dir -D \
+ --download-dir -d \
+ --master-repository-dir \
+ --write-cache-dir \
+ --report-file -r"
+
+ case "${cur}" in
+ -*)
+ COMPREPLY=($(compgen -W "${opts}" -- "${cur}"))
+ return 0
+ ;;
+ *)
+ case "${prev}" in
+ ## Enum operators
+ --log-level)
+ COMPREPLY=($(compgen -W "debug qa warning silent" -- "${cur}"))
+ return 0
+ ;;
+
+ --repository-dir|-D|--download-dir|-d|--master-repository-dir|--write-cache-dir)
+ _filedir -d
+ return 0
+ ;;
+
+ --report-file|-r)
+ _filedir
+ return 0
+ ;;
+
+ esac
+ ;;
+ esac
+}
+complete -o filenames -F _accerso accerso
diff --git a/bash-completion/adjutrix b/bash-completion/adjutrix
index 1180460..0be3a8d 100644
--- a/bash-completion/adjutrix
+++ b/bash-completion/adjutrix
@@ -39,7 +39,6 @@ _adjutrix() {
--keyword-graph -k \
--reverse-deps -r \
--what-needs-keywording -w \
- --display-profiles-use -u \
--display-default-system-resolution -S \
--build-downgrade-check-list \
--downgrade-check \
@@ -53,7 +52,8 @@ _adjutrix() {
--package -P \
--profile \
--unstable \
- --write-cache-dir"
+ --write-cache-dir \
+ --master-repository-dir"
case "${cur}" in
-*)
@@ -97,7 +97,7 @@ _adjutrix() {
return 0
;;
- --repository-dir|-D|--write-cache-dir)
+ --repository-dir|-D|--write-cache-dir|--master-repository-dir)
_filedir -d
return 0
;;
diff --git a/bash-completion/instruo b/bash-completion/instruo
new file mode 100644
index 0000000..63575a4
--- /dev/null
+++ b/bash-completion/instruo
@@ -0,0 +1,72 @@
+# Bash completion function for instruo
+# vim: set et sw=4 sts=4 ts=4 ft=sh :
+
+# NOTE: This is still a work in progress, don't expect it to work well or
+# properly right now.
+
+_instruo_get_repodir() {
+ local repodir
+ [[ -f ./profiles/repo_name ]] && repodir=$(readlink -f $(pwd))
+ [[ -z "${repodir}" && -f ../profiles/repo_name ]] \
+ && repodir=$(readlink -f $(pwd)/..)
+ [[ -z "${repodir}" && -f ../../profiles/repo_name ]] \
+ && repodir=$(readlink -f $(pwd)/../..)
+ [[ -z "${repodir}" ]] && return 1
+ echo "${repodir}"
+}
+
+_instruo() {
+ local cur prev opts
+ COMPREPLY=()
+ cur=${COMP_WORDS[COMP_CWORD]}
+ prev=${COMP_WORDS[COMP_CWORD-1]}
+
+ # Figure out what our repository dir is
+ for i in $(seq 0 ${COMP_CWORD}) ; do
+ if [[ ${COMP_WORDS[i]} == "-D" \
+ || ${COMP_WORDS[i]} == "--repository-dir" ]]
+ then
+ repodir=${COMP_WORDS[i+1]}
+ fi
+ done
+ [[ -z "${repodir}" ]] && repodir="$(_instruo_get_repodir)"
+
+ opts="--generate-cache -g \
+ --version -V \
+ --help -h \
+ --log-level \
+ --no-colour \
+ --no-color \
+ --repository-dir -D \
+ --output-dir -o \
+ --master-repository-dir \
+ --report-file -r"
+
+ case "${cur}" in
+ -*)
+ COMPREPLY=($(compgen -W "${opts}" -- "${cur}"))
+ return 0
+ ;;
+ *)
+ case "${prev}" in
+ ## Enum operators
+ --log-level)
+ COMPREPLY=($(compgen -W "debug qa warning silent" -- "${cur}"))
+ return 0
+ ;;
+
+ --repository-dir|-D|--output-dir|-o|--master-repository-dir)
+ _filedir -d
+ return 0
+ ;;
+
+ --report-file|-r)
+ _filedir
+ return 0
+ ;;
+
+ esac
+ ;;
+ esac
+}
+complete -o filenames -F _instruo instruo
diff --git a/bash-completion/paludis b/bash-completion/paludis
index 8f9bb4e..b2e7869 100644
--- a/bash-completion/paludis
+++ b/bash-completion/paludis
@@ -52,6 +52,7 @@ _paludis() {
--help -h \
--has-version \
--best-version \
+ --match \
--environment-variable \
--configuration-variable \
--list-repositories \
@@ -61,7 +62,6 @@ _paludis() {
--list-sync-protocols \
--list-repository-formats \
--list-dep-tag-categories \
- --update-news \
--regenerate-installed-cache \
--regenerate-installable-cache"
general_opts="--log-level \
@@ -98,10 +98,12 @@ _paludis() {
--add-to-world-spec \
--no-config-protection \
--debug-build \
+ --checks \
--fetch -f \
- --safe-resume \
+ --no-safe-resume \
--show-reasons \
--show-use-descriptions \
+ --continue-on-failure \
${deplist_opts}"
uninstall_opts="--pretend -p \
--destinations -d \
@@ -127,10 +129,9 @@ _paludis() {
--category \
--package \
--set"
- regen_news_opts=""
regen_repos_opts=""
- all_opts="${action_opts} ${general_opts} ${query_opts} ${install_opts} ${uninstall_opts} ${sync_opts} ${report_opts} ${contents_opts} ${owner_opts} ${version_query_opts} ${variable_query_opts} ${list_opts} ${regen_news_opts} ${regen_repos_opts}"
+ all_opts="${action_opts} ${general_opts} ${query_opts} ${install_opts} ${uninstall_opts} ${sync_opts} ${report_opts} ${contents_opts} ${owner_opts} ${version_query_opts} ${variable_query_opts} ${list_opts} ${regen_repos_opts}"
local x
for x in "${COMP_WORDS[@]}" ; do
@@ -171,7 +172,7 @@ _paludis() {
action="info"
break
;;
- --has-version|--best-version)
+ --has-version|--best-version|--match)
action="version_query"
break
;;
@@ -187,10 +188,6 @@ _paludis() {
action="list"
break
;;
- --update-news)
- action="regen_news"
- break
- ;;
--regenerate-installed-cache|--regenerate-installable-cache)
action="regen_repos"
break
@@ -218,6 +215,10 @@ _paludis() {
COMPREPLY=($(compgen -W "none split internal" -- "${cur}"))
return 0
;;
+ --checks)
+ COMPREPLY=($(compgen -W "none default always" -- "${cur}"))
+ return 0
+ ;;
--show-reasons)
COMPREPLY=($(compgen -W "none summary full" -- "${cur}"))
return 0
@@ -226,6 +227,10 @@ _paludis() {
COMPREPLY=($(compgen -W "none new changed all" -- "${cur}"))
return 0
;;
+ --continue-on-failure)
+ COMPREPLY=($(compgen -W "if-fetch-only never if-satisfied always" -- "${cur}"))
+ return 0
+ ;;
--dl-reinstall)
COMPREPLY=($(compgen -W "never always if-use-changed" -- "${cur}"))
@@ -312,7 +317,7 @@ _paludis() {
COMPREPLY=($(compgen -W "$(_paludis_dolist repositories)" -- "${cur}"))
return 0
;;
- report|info|list|regen_news)
+ report|info|list)
return 0
;;
owner)
diff --git a/bash-completion/qualudis b/bash-completion/qualudis
index 0254233..9cc2ecd 100644
--- a/bash-completion/qualudis
+++ b/bash-completion/qualudis
@@ -26,19 +26,13 @@ _qualudis() {
[[ -d ${cur} ]] && repodir="$(_qualudis_get_repodir "${cur}")"
[[ -z "${repodir}" ]] && repodir="$(_qualudis_get_repodir "$(pwd)")"
- opts="--describe -d \
- --version -V \
+ opts="--version -V \
--help -h \
- --qa-check -c \
- --exclude-qa-check -C \
- --archs -a \
- --excluded-arches -A \
- --verbose -v \
- --quiet -q \
--log-level -L \
--message-level -M \
--write-cache-dir \
- --master-repository-dir"
+ --master-repository-dir \
+ --use-repository-cache"
case "${cur}" in
-*)
@@ -53,17 +47,7 @@ _qualudis() {
return 0
;;
--message-level|-M)
- COMPREPLY=($(compgen -W "info minor major fatal" -- "${cur}"))
- return 0
- ;;
-
- --qa-check|-c|--exclude-qa-check|-C)
- COMPREPLY=($(compgen -W "$(qualudis --log-level silent --describe |sed -n 's/^ \(.*\):$/\1/p')" -- "${cur}"))
- return 0
- ;;
-
- --arches|-a|--exclude-arches|-A)
- COMPREPLY=($(compgen -W "$(< "${repodir}/profiles/arch.list")" -- "${cur}"))
+ COMPREPLY=($(compgen -W "debug maybe minor normal severe" -- "${cur}"))
return 0
;;
diff --git a/bash-completion/reconcilio b/bash-completion/reconcilio
new file mode 100644
index 0000000..292e757
--- /dev/null
+++ b/bash-completion/reconcilio
@@ -0,0 +1,165 @@
+# Bash completion function for reconcilio
+# vim: set et sw=4 sts=4 ts=4 ft=sh :
+
+# NOTE: This is still a work in progress, don't expect it to work well or
+# properly right now.
+
+_reconcilio() {
+ local cur prev opts
+
+ local action_opts general_opts deplist_opts
+ local linkage_opts install_opts all_opts
+
+ COMPREPLY=()
+ cur=${COMP_WORDS[COMP_CWORD]}
+ prev=${COMP_WORDS[COMP_CWORD-1]}
+
+ action_opts="--fix-linkage \
+ --version -V \
+ --help -h"
+ general_opts="--log-level \
+ --no-colour \
+ --no-color \
+ --environment -E \
+ --exact \
+ --verbose -v \
+ --resume-command-template"
+ linkage_opts="--library"
+ install_opts="--pretend -p \
+ --no-config-protection \
+ --debug-build \
+ --checks \
+ --fetch -f \
+ --no-safe-resume \
+ --show-reasons \
+ --show-use-descriptions \
+ --continue-on-failure"
+ deplist_opts="--dl-reinstall \
+ --dl-reinstall-scm \
+ --dl-upgrade \
+ --dl-new-slots \
+ --dl-downgrade \
+ --dl-deps-default \
+ --dl-installed-deps-pre \
+ --dl-installed-deps-runtime \
+ --dl-installed-deps-post \
+ --dl-uninstalled-deps-pre \
+ --dl-uninstalled-deps-runtime \
+ --dl-uninstalled-deps-post \
+ --dl-uninstalled-deps-suggested \
+ --dl-suggested \
+ --dl-circular \
+ --dl-blocks \
+ --dl-override-masks \
+ --dl-fall-back"
+
+ all_opts="${action_opts} ${general_opts} ${linkage_opts} ${install_opts} ${deplist_opts}"
+
+ local x
+ for x in "${COMP_WORDS[@]}" ; do
+ case "${x}" in
+ --fix-linkage)
+ action="linkage"
+ break
+ ;;
+ --version|-V|--help|-h)
+ action="info"
+ break
+ ;;
+ esac
+ done
+
+ case "${cur}" in
+ -*)
+ local opts=
+ [[ -z "${action}" ]] && action="all"
+ opts="${action}_opts"
+
+ COMPREPLY=($(compgen -W "${!opts}" -- "${cur}"))
+ return 0
+ ;;
+ *)
+ case "${prev}" in
+ ## Enum operators
+ --log-level|-L)
+ COMPREPLY=($(compgen -W "debug qa warning silent" -- "${cur}"))
+ return 0
+ ;;
+ --debug-build)
+ COMPREPLY=($(compgen -W "none split internal" -- "${cur}"))
+ return 0
+ ;;
+ --checks)
+ COMPREPLY=($(compgen -W "none default always" -- "${cur}"))
+ return 0
+ ;;
+ --show-reasons)
+ COMPREPLY=($(compgen -W "none summary full" -- "${cur}"))
+ return 0
+ ;;
+ --show-use-descriptions)
+ COMPREPLY=($(compgen -W "none new changed all" -- "${cur}"))
+ return 0
+ ;;
+ --continue-on-failure)
+ COMPREPLY=($(compgen -W "if-fetch-only never if-satisfied always" -- "${cur}"))
+ return 0
+ ;;
+
+ --dl-reinstall)
+ COMPREPLY=($(compgen -W "never always if-use-changed" -- "${cur}"))
+ return 0
+ ;;
+ --dl-reinstall-scm)
+ COMPREPLY=($(compgen -W "never always daily weekly" -- "${cur}"))
+ return 0
+ ;;
+ --dl-upgrade)
+ COMPREPLY=($(compgen -W "always as-needed" -- "${cur}"))
+ return 0
+ ;;
+ --dl-new-slots)
+ COMPREPLY=($(compgen -W "always as-needed" -- "${cur}"))
+ return 0
+ ;;
+ --dl-downgrade)
+ COMPREPLY=($(compgen -W "as-needed warning error" -- "${cur}"))
+ return 0
+ ;;
+ --dl-deps-default|--dl-installed-deps-pre|--dl-installed-deps-runtime|--dl-installed-deps-post|--dl-uninstalled-deps-pre|--dl-uninstalled-deps-runtime|--dl-uninstalled-deps-post|--dl-uninstalled-deps-suggested)
+ COMPREPLY=($(compgen -W "pre pre-or-post post try-post discard" -- "${cur}"))
+ return 0
+ ;;
+
+ --dl-suggested)
+ COMPREPLY=($(compgen -W "show install discard" -- "${cur}"))
+ return 0
+ ;;
+ --dl-circular)
+ COMPREPLY=($(compgen -W "error discard" -- "${cur}"))
+ return 0
+ ;;
+ --dl-blocks)
+ COMPREPLY=($(compgen -W "accumulate error discard" -- "${cur}"))
+ return 0
+ ;;
+ --dl-override-masks)
+ COMPREPLY=($(compgen -W "tilde-keyword unkeyworded profile repository license" -- "${cur}"))
+ return 0
+ ;;
+ --dl-fall-back)
+ COMPREPLY=($(compgen -W "as-needed-except-targets as-needed never" -- "${cur}"))
+ return 0
+ ;;
+ *)
+ case "${action}" in
+ --fix-linkage)
+ return 0
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+}
+complete -F _reconcilio reconcilio