aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Mike Kelly <pioto@pioto.org> 2007-01-07 20:20:46 +0000
committerAvatar Mike Kelly <pioto@pioto.org> 2007-01-07 20:20:46 +0000
commit46fd2c4fcb59d640e9cf288a8929a138ea15223c (patch)
tree54dd6e905c438dd4a8dc2c69d26b3d465e3e9041
parentc393b80006b19d0b140aab7dd6ca5b74e5794789 (diff)
downloadpaludis-46fd2c4fcb59d640e9cf288a8929a138ea15223c.tar.gz
paludis-46fd2c4fcb59d640e9cf288a8929a138ea15223c.tar.xz
Make repodir finding a bit better for adjutrix. Fix a typo in the paludis bashcomp.
-rw-r--r--bash-completion/adjutrix6
-rw-r--r--bash-completion/paludis2
2 files changed, 5 insertions, 3 deletions
diff --git a/bash-completion/adjutrix b/bash-completion/adjutrix
index 739dbac..94d313d 100644
--- a/bash-completion/adjutrix
+++ b/bash-completion/adjutrix
@@ -8,8 +8,10 @@
_adjutrix_get_repodir() {
local repodir
[[ -f ./profiles/repo_name ]] && repodir=$(readlink -f $(pwd))
- [[ -f ../profiles/repo_name ]] && repodir=$(readlink -f $(pwd)/..)
- [[ -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}"
}
diff --git a/bash-completion/paludis b/bash-completion/paludis
index c551e82..1077f9c 100644
--- a/bash-completion/paludis
+++ b/bash-completion/paludis
@@ -213,7 +213,7 @@ _paludis() {
return 0
;;
--dl-new-slots)
- COMPREPLY=($(compgen -w "always as-needed" -- "${cur}"))
+ COMPREPLY=($(compgen -W "always as-needed" -- "${cur}"))
return 0
;;