summaryrefslogtreecommitdiff
path: root/net:foret
diff options
context:
space:
mode:
authorHugues Hiegel <hugues.hiegel@qosmos.com>2012-06-08 17:21:16 +0200
committerHugues Hiegel <hugues.hiegel@qosmos.com>2012-06-08 17:21:16 +0200
commitb544003f665815700c3e692ed8528ad43fd12cd3 (patch)
treec3433b820d693b0f804152ed6d8e345e8c8c55c0 /net:foret
parente2268a81ae230fb21c37cca4abdfb675adde9ea6 (diff)
[Completion] Q : specific completion. :)
Diffstat (limited to 'net:foret')
-rw-r--r--net:foret/Completion.zsh13
-rw-r--r--net:foret/completion/_sdk-factory.sh7
-rw-r--r--net:foret/completion/_sdk-patch.sh8
-rw-r--r--net:foret/completion/_sdk-qa.sh8
-rw-r--r--net:foret/completion/_sdk-test.sh8
-rw-r--r--net:foret/completion/_set-target-build-env.sh6
6 files changed, 50 insertions, 0 deletions
diff --git a/net:foret/Completion.zsh b/net:foret/Completion.zsh
new file mode 100644
index 0000000..0243102
--- /dev/null
+++ b/net:foret/Completion.zsh
@@ -0,0 +1,13 @@
+##
+## Part of configuration files for Zsh4
+## AUTHOR: Hugues Hiegel <hugues@hiegel.fr>
+##
+## You are encouraged to use, modify, and redistribute
+## these files with or without this notice.
+##
+## NO WARRANTY PROVIDED, USE AT YOUR OWN RISKS
+##
+
+fpath=($specific_script:h/completion $fpath)
+compinit
+
diff --git a/net:foret/completion/_sdk-factory.sh b/net:foret/completion/_sdk-factory.sh
new file mode 100644
index 0000000..53f1cca
--- /dev/null
+++ b/net:foret/completion/_sdk-factory.sh
@@ -0,0 +1,7 @@
+#compdef sdk-factory.sh
+
+_arguments -A "-*" -- \
+ "=FILE*:file:_files"\
+ "{-c,--config}:file:_files"\
+ "*:targets:($([ -n "\$TARGET" ] && for i in "" "-PLUGIN" "-APPSDK" "-PERF" ; echo \$TARGET$i))"
+
diff --git a/net:foret/completion/_sdk-patch.sh b/net:foret/completion/_sdk-patch.sh
new file mode 100644
index 0000000..a8cc4c3
--- /dev/null
+++ b/net:foret/completion/_sdk-patch.sh
@@ -0,0 +1,8 @@
+#compdef sdk-patch.sh
+
+_arguments -A "-*" \
+ -- \
+ "*=FILE*:file:_files"\
+ "*{-c,--config}:file:_files"\
+ ":targets:($([ -n "$TARGET" ] && for i in "" "-PLUGIN" "-APPSDK" "-PERF" ; echo $TARGET$i))"
+
diff --git a/net:foret/completion/_sdk-qa.sh b/net:foret/completion/_sdk-qa.sh
new file mode 100644
index 0000000..3dfcb68
--- /dev/null
+++ b/net:foret/completion/_sdk-qa.sh
@@ -0,0 +1,8 @@
+#compdef sdk-qa.sh
+
+_arguments -A "-*" \
+ -- \
+ "*=FILE*:file:_files"\
+ "*{-c,--config}:file:_files"\
+ ":targets:($([ -n "$TARGET" ] && for i in "" "-PLUGIN" "-APPSDK" "-PERF" ; echo $TARGET$i))"
+
diff --git a/net:foret/completion/_sdk-test.sh b/net:foret/completion/_sdk-test.sh
new file mode 100644
index 0000000..d034421
--- /dev/null
+++ b/net:foret/completion/_sdk-test.sh
@@ -0,0 +1,8 @@
+#compdef sdk-test.sh
+
+_arguments -A "-*" \
+ -- \
+ "*=FILE*:file:_files"\
+ "*{-c,--config}:file:_files"\
+ ":targets:($([ -n "$TARGET" ] && for i in "" "-PLUGIN" "-APPSDK" "-PERF" ; echo $TARGET$i))"
+
diff --git a/net:foret/completion/_set-target-build-env.sh b/net:foret/completion/_set-target-build-env.sh
new file mode 100644
index 0000000..53291a8
--- /dev/null
+++ b/net:foret/completion/_set-target-build-env.sh
@@ -0,0 +1,6 @@
+#compdef set-target-build-env.sh
+
+_arguments "1:build targets:($(
+ awk '/^ [-_a-zA-Z0-9]+$/ { print $1 }' tools/sdk-targets.txt
+ ))"
+