aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Mike Kelly <pioto@pioto.org> 2006-12-24 20:30:09 +0000
committerAvatar Mike Kelly <pioto@pioto.org> 2006-12-24 20:30:09 +0000
commit300f516f45c43720caf82aad1a081f0ab559d590 (patch)
tree9bd20fedd9996a6a8841d4a9c9b762ea1b9ee37b
parent3cf5182bc49324637d6581ebdc20aec78bd7a8b7 (diff)
downloadpaludis-300f516f45c43720caf82aad1a081f0ab559d590.tar.gz
paludis-300f516f45c43720caf82aad1a081f0ab559d590.tar.xz
Use _filedir (from the main bash-completion package) for filename / dirname completion. This means files with spaces in their names, for example, will work right.
-rw-r--r--bash-completion/adjutrix8
-rw-r--r--bash-completion/paludis6
-rw-r--r--bash-completion/qualudis2
3 files changed, 7 insertions, 9 deletions
diff --git a/bash-completion/adjutrix b/bash-completion/adjutrix
index 8723a58..739dbac 100644
--- a/bash-completion/adjutrix
+++ b/bash-completion/adjutrix
@@ -87,14 +87,12 @@ _adjutrix() {
;;
--repository-dir|-D|--write-cache-dir)
- COMPREPLY=($(compgen -d -- "${cur}"))
+ _filedir -d
return 0
;;
--profile|-p)
- COMPREPLY=($(compgen -W "$(\
- grep -ve ^\# -ve ^\$ ${repodir}/profiles/profiles.desc \
- |awk '{print $2}')" -- "${cur}"))
+ COMPREPLY=($(compgen -W "$(sed -n 's,^[^#][^[:space:]]*[[:space:]]*\([^[:space:]]*\).*,\1,p' "${repodir}/profiles/profiles.desc")" -- "${cur}"))
return 0
;;
@@ -104,4 +102,4 @@ _adjutrix() {
;;
esac
}
-complete -F _adjutrix adjutrix
+complete -o filenames -F _adjutrix adjutrix
diff --git a/bash-completion/paludis b/bash-completion/paludis
index 1466449..1e2d37e 100644
--- a/bash-completion/paludis
+++ b/bash-completion/paludis
@@ -230,7 +230,7 @@ _paludis() {
return 0
;;
--owner|-o)
- COMPREPLY=($(compgen -f -- "${cur}"))
+ _filedir
return 0
;;
#=*|>*|>*|~*)
@@ -246,7 +246,7 @@ _paludis() {
return 0
;;
owner)
- COMPREPLY=($(compgen -f -- "${cur}"))
+ _filedir
return 0
;;
conf_variable_query)
@@ -281,8 +281,8 @@ _paludis() {
$(compgen -W "$(_paludis_dolist sets)" -- "${cur}")
$(compgen -W "$(_paludis_dolist categories)" -- "${cur}")
$(compgen -W "$(_paludis_packagenames)" -- "${cur}")
- $(compgen -f -- "${cur}")
)
+ _filedir
return 0
;;
esac
diff --git a/bash-completion/qualudis b/bash-completion/qualudis
index 04e7859..150a765 100644
--- a/bash-completion/qualudis
+++ b/bash-completion/qualudis
@@ -44,7 +44,7 @@ _qualudis() {
;;
*)
- COMPREPLY=($(compgen -d -- "${cur}"))
+ _filedir -d
;;
esac
;;