aboutsummaryrefslogtreecommitdiff
path: root/bash-completion
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2011-06-16 13:52:13 +0100
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2011-06-16 13:52:13 +0100
commitf44204d088eb37c22ca73204b02d5860d8b5fed1 (patch)
tree0909d5fbdfe6698a9f6b096931a89d7b9f229ab8 /bash-completion
parent0465d3dd418e96a3a4c97ffe74dfa52884dd8b2b (diff)
downloadpaludis-f44204d088eb37c22ca73204b02d5860d8b5fed1.tar.gz
paludis-f44204d088eb37c22ca73204b02d5860d8b5fed1.tar.xz
Accerso is dead
Diffstat (limited to 'bash-completion')
-rw-r--r--bash-completion/Makefile.am2
-rw-r--r--bash-completion/accerso74
2 files changed, 1 insertions, 75 deletions
diff --git a/bash-completion/Makefile.am b/bash-completion/Makefile.am
index 1fd86f955..be3bd6ce6 100644
--- a/bash-completion/Makefile.am
+++ b/bash-completion/Makefile.am
@@ -1,5 +1,5 @@
MAINTAINERCLEANFILES = Makefile.in
-noinst_DATA = accerso cave
+noinst_DATA = cave
EXTRA_DIST = $(noinst_DATA)
AUTOMAKE_OPTIONS = 1.11 parallel-tests
diff --git a/bash-completion/accerso b/bash-completion/accerso
deleted file mode 100644
index ad181b20c..000000000
--- a/bash-completion/accerso
+++ /dev/null
@@ -1,74 +0,0 @@
-# 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 \
- --extra-repository-dir \
- --master-repository-name \
- --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|--extra-repository-dir|--write-cache-dir)
- _filedir -d
- return 0
- ;;
-
- --report-file|-r)
- _filedir
- return 0
- ;;
-
- esac
- ;;
- esac
-}
-complete -o filenames -F _accerso accerso