Permalink
Browse files

Added command completion for Selenium build tasks.

  • Loading branch information...
1 parent d609bd6 commit 6b2876f96a347bf04907f241bc3805e12fb56b41 @nirvdrum committed Jun 26, 2012
Showing with 19 additions and 0 deletions.
  1. +13 −0 completions/go.fish
  2. +3 −0 functions/go.fish
  3. +3 −0 functions/gridtest.fish
View
@@ -0,0 +1,13 @@
+function __cache_or_get_go_completion -d "Create go completions"
+ mkdir -p "/tmp/go_completion_cache_for_$USER"
+ set -l hashed_pwd (echo (pwd) | md5sum | cut -d " " -f 1)
+ set -l go_cache_file "/tmp/go_completion_cache_for_$USER/$hashed_pwd"
+
+ if not test -f "$go_cache_file"
+ go -T 2>&1 | grep "^go" |cut -d " " -f 2 > "$go_cache_file"
+ end
+
+ cat "$go_cache_file"
+end
+
+complete -x -c go -a "(__cache_or_get_go_completion)" --description 'go Task'
View
@@ -0,0 +1,3 @@
+function go
+ ./go $argv
+end
@@ -0,0 +1,3 @@
+function gridtest
+ ./go //java/server/test/org/openqa/grid:test:run
+end

0 comments on commit 6b2876f

Please sign in to comment.