summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Pereira Neves2014-08-21 16:09:44 +0200
committerMichael Pereira Neves2014-08-21 16:09:44 +0200
commit4d3aeb2ab0ada1346f921ddb52f288255696d804 (patch)
tree5334c10ff12115ccc38cd9f7ecf18595ea132233
parent[useful] zsh completion plugin for mltk/openslx cmds (diff)
downloadtm-scripts-4d3aeb2ab0ada1346f921ddb52f288255696d804.tar.gz
tm-scripts-4d3aeb2ab0ada1346f921ddb52f288255696d804.tar.xz
tm-scripts-4d3aeb2ab0ada1346f921ddb52f288255696d804.zip
[zsh-completion] 'mltk -n' now shows list of existing folders in /export
-rw-r--r--useful/zsh-completion/openslx/_mltk6
1 files changed, 4 insertions, 2 deletions
diff --git a/useful/zsh-completion/openslx/_mltk b/useful/zsh-completion/openslx/_mltk
index fccceb1b..5abf68f3 100644
--- a/useful/zsh-completion/openslx/_mltk
+++ b/useful/zsh-completion/openslx/_mltk
@@ -8,12 +8,14 @@ _mltk_target_modules() {
target_modules=(`ls remote/targets/$1`)
}
-local -a targets target_modules
+local -a _targets target_modules export_dirs
_targets=(`ls remote/targets`)
+[ -d "/export" ] && export_dirs=(`ls /export`)
+
_arguments \
"--help[display help text]: :->help" \
- "-n[-n \[name\] bind mount all the local builds (remote/builds) to /export/builds or /export/\[name\]]: :->bind" \
+ "(: -)-n[-n \[name\] bind mount all the local builds (remote/builds) to /export/builds or /export/\[name\]]:Existing folders in /export:($export_dirs)" \
"*:: :->target" && return 0
if (( CURRENT == 1 )); then