diff options
author | 2011-02-06 13:40:38 +0000 | |
---|---|---|
committer | 2011-02-06 13:40:38 +0000 | |
commit | ddcc1913de592ad6c08212fe09efd68328b43dc1 (patch) | |
tree | de28de51eacc21d9f7834a4e7ad0084c74b9ee70 /bash-completion | |
parent | fe657fcda33701ce86fbdf83ed9621e40fc2c11d (diff) | |
download | paludis-ddcc1913de592ad6c08212fe09efd68328b43dc1.tar.gz paludis-ddcc1913de592ad6c08212fe09efd68328b43dc1.tar.xz |
Kill adjutrix
Diffstat (limited to 'bash-completion')
-rw-r--r-- | bash-completion/Makefile.am | 2 | ||||
-rw-r--r-- | bash-completion/adjutrix | 118 |
2 files changed, 1 insertions, 119 deletions
diff --git a/bash-completion/Makefile.am b/bash-completion/Makefile.am index bbcc02869..05e5ee93d 100644 --- a/bash-completion/Makefile.am +++ b/bash-completion/Makefile.am @@ -1,5 +1,5 @@ MAINTAINERCLEANFILES = Makefile.in -noinst_DATA = adjutrix accerso instruo cave +noinst_DATA = accerso instruo cave EXTRA_DIST = $(noinst_DATA) AUTOMAKE_OPTIONS = 1.11 parallel-tests diff --git a/bash-completion/adjutrix b/bash-completion/adjutrix deleted file mode 100644 index 7ed2688fa..000000000 --- a/bash-completion/adjutrix +++ /dev/null @@ -1,118 +0,0 @@ -# Bash completion function for adjutrix -# Written by Mike Kelly -# 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. - -_adjutrix_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}" -} - -_adjutrix() { - local cur prev opts repodir - 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="$(_adjutrix_get_repodir)" - - opts="--find-stable-candidates -s \ - --find-dropped-keywords -d \ - --find-insecure-packages -i \ - --find-unused-packages -U \ - --keyword-graph -k \ - --reverse-deps -r \ - --what-needs-keywording -w \ - --display-default-system-resolution -S \ - --build-downgrade-check-list \ - --downgrade-check \ - --version -V \ - --help -h \ - --log-level \ - --no-colour \ - --no-color \ - --no-suggestions \ - --repository-dir -D \ - --category -C \ - --package -P \ - --profile \ - --unstable \ - --write-cache-dir \ - --master-repository-name \ - --extra-repository-dir" - - 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 - ;; - - --category|-C) - [[ -z "${repodir}" ]] && return 0 - COMPREPLY=($(compgen -W "$(< ${repodir}/profiles/categories)" -- "${cur}")) - return 0 - ;; - --package|-P) - [[ -z "${repodir}" ]] && return 0 - # borrowed from the gentoo bashcomp script - local p - COMPREPLY=($(compgen -W "$(\ - builtin cd ${repodir}; \ - for p in *-*/${cur}*; do \ - [[ -d ${p} ]] && \ - echo ${p##*/} ; \ - done)" -- "${cur}")) - return 0 - ;; - - --find-stable-candidates|-s|--find-dropped-keywords|-d) - [[ -z "${repodir}" ]] && return 0 - COMPREPLY=($(compgen -W "$(< ${repodir}/profiles/arch.list)" -- "${cur}")) - return 0 - ;; - --what-needs-keywording|-w) - # still needs some improvement to do package names as the second arg... - COMPREPLY=($(compgen -W "$(< ${repodir}/profiles/arch.list)" -- "${cur}")) - return 0 - ;; - - --repository-dir|-D|--write-cache-dir|--extra-repository-dir) - _filedir -d - return 0 - ;; - - --profile) - COMPREPLY=($(compgen -W "$(sed -n 's,^[^#][^[:space:]]*[[:space:]]*\([^[:space:]]*\).*,\1,p' "${repodir}/profiles/profiles.desc")" -- "${cur}")) - return 0 - ;; - - *) - ;; - esac - ;; - esac -} -complete -o filenames -F _adjutrix adjutrix |