aboutsummaryrefslogtreecommitdiff
path: root/bash-completion
diff options
context:
space:
mode:
authorAvatar Ingmar Vanhassel <ingmar@exherbo.org> 2009-10-21 01:30:52 +0200
committerAvatar Ingmar Vanhassel <ingmar@exherbo.org> 2009-10-21 01:30:52 +0200
commit45704db9440727afb2d6b17884e3367ca503497a (patch)
tree432362b3d4e2feacf9fc454ccf0e9cec0241f499 /bash-completion
parent9f94ffc79bbebf2523b987840eb40a69d30cc9f0 (diff)
downloadpaludis-45704db9440727afb2d6b17884e3367ca503497a.tar.gz
paludis-45704db9440727afb2d6b17884e3367ca503497a.tar.xz
Qualudis leftovers
Diffstat (limited to 'bash-completion')
-rw-r--r--bash-completion/Makefile.am2
-rw-r--r--bash-completion/qualudis63
2 files changed, 1 insertions, 64 deletions
diff --git a/bash-completion/Makefile.am b/bash-completion/Makefile.am
index bccd406b7..2609b9056 100644
--- a/bash-completion/Makefile.am
+++ b/bash-completion/Makefile.am
@@ -1,5 +1,5 @@
MAINTAINERCLEANFILES = Makefile.in
-noinst_DATA = paludis adjutrix qualudis \
+noinst_DATA = paludis adjutrix \
inquisitio \
accerso instruo reconcilio \
importare
diff --git a/bash-completion/qualudis b/bash-completion/qualudis
deleted file mode 100644
index 5ac3a04dd..000000000
--- a/bash-completion/qualudis
+++ /dev/null
@@ -1,63 +0,0 @@
-# Bash completion function for qualudis
-# 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.
-
-_qualudis_get_repodir() {
- local repodir starting_dir="${1}"
- [[ -f ./profiles/repo_name ]] && repodir=$(readlink -f ${starting_dir})
- [[ -z "${repodir}" && -f ../profiles/repo_name ]] \
- && repodir=$(readlink -f ${starting_dir}/..)
- [[ -z "${repodir}" && -f ../../profiles/repo_name ]] \
- && repodir=$(readlink -f ${starting_dir}/../..)
- [[ -z "${repodir}" ]] && return 1
- echo "${repodir}"
-}
-
-_qualudis() {
- local cur prev opts repodir
- COMPREPLY=()
- cur=${COMP_WORDS[COMP_CWORD]}
- prev=${COMP_WORDS[COMP_CWORD-1]}
-
- # Figure out what our repository dir is
- [[ -d ${cur} ]] && repodir="$(_qualudis_get_repodir "${cur}")"
- [[ -z "${repodir}" ]] && repodir="$(_qualudis_get_repodir "$(pwd)")"
-
- opts="--version -V \
- --help -h \
- --log-level -L \
- --message-level -M \
- --write-cache-dir \
- --master-repository-name \
- --extra-repository-dir \
- --use-repository-cache \
- --show-associated-keys"
-
- case "${cur}" in
- -*)
- 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
- ;;
- --message-level|-M)
- COMPREPLY=($(compgen -W "debug maybe minor normal severe" -- "${cur}"))
- return 0
- ;;
-
- *)
- _filedir -d
- ;;
- esac
- ;;
- esac
-}
-complete -o filenames -F _qualudis qualudis