diff options
author | Christopher Vogt <oss.nsp@cvogt.org> | 2016-09-13 13:51:17 +0100 |
---|---|---|
committer | Christopher Vogt <oss.nsp@cvogt.org> | 2016-09-13 13:51:17 +0100 |
commit | 356ff2ec817dbc65f27ec37e644204359ec84210 (patch) | |
tree | 6a3654b3cb6bacb45fe0862bc0ee8fff9bf66e31 | |
parent | ede10d4d0e139eb8f831b7241d29fb82d8996e73 (diff) | |
download | cbt-356ff2ec817dbc65f27ec37e644204359ec84210.tar.gz cbt-356ff2ec817dbc65f27ec37e644204359ec84210.tar.bz2 cbt-356ff2ec817dbc65f27ec37e644204359ec84210.zip |
add fish shell task name completions and fix bash task name completions
-rw-r--r-- | README.md | 5 | ||||
-rwxr-xr-x | shell-integration/cbt-completions.bash | 2 | ||||
-rw-r--r-- | shell-integration/cbt-completions.fish | 1 | ||||
-rw-r--r-- | stage2/BasicBuild.scala | 2 |
4 files changed, 9 insertions, 1 deletions
@@ -192,3 +192,8 @@ for f in ~/.bash_completion.d/*; do source $f done ``` + +Fish shell completions +---------------- +copy this line into your fish configuration, on OSX: /.config/fish/config.fish +complete -c cbt -a '(cbt taskNames)' diff --git a/shell-integration/cbt-completions.bash b/shell-integration/cbt-completions.bash index c591321..925ba4b 100755 --- a/shell-integration/cbt-completions.bash +++ b/shell-integration/cbt-completions.bash @@ -5,7 +5,7 @@ __cbt() COMPREPLY=() cur="${COMP_WORDS[COMP_CWORD]}" prev="${COMP_WORDS[COMP_CWORD-1]}" - opts="$(cbt usage)" + opts="$(cbt taskNames)" COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) return 0 } diff --git a/shell-integration/cbt-completions.fish b/shell-integration/cbt-completions.fish new file mode 100644 index 0000000..6e543fb --- /dev/null +++ b/shell-integration/cbt-completions.fish @@ -0,0 +1 @@ +complete -c cbt -a (cbt taskNames) diff --git a/stage2/BasicBuild.scala b/stage2/BasicBuild.scala index 410d68f..b2bb72b 100644 --- a/stage2/BasicBuild.scala +++ b/stage2/BasicBuild.scala @@ -25,6 +25,8 @@ trait BaseBuild extends DependencyImplementation with BuildInterface with Trigge final def projectDirectory: File = lib.realpath(context.projectDirectory) assert( projectDirectory.exists, "projectDirectory does not exist: " ++ projectDirectory.string ) final def usage: String = lib.usage(this.getClass, show) + + final def taskNames: String = lib.taskNames(this.getClass).sorted.mkString("\n") // ========== meta data ========== |