From 9cf4a6a1023dda70072b76bd881efbd12c2270d1 Mon Sep 17 00:00:00 2001 From: Christopher Vogt Date: Mon, 6 Mar 2017 06:59:23 -0500 Subject: rename taskNames to complete and pass in current readline buffer in fish for zsh and bash this still needs to be done. Also interpreting the buffer to complete the current command --- shell-integration/cbt-completions.bash | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'shell-integration/cbt-completions.bash') diff --git a/shell-integration/cbt-completions.bash b/shell-integration/cbt-completions.bash index 925ba4b..deb88c1 100755 --- a/shell-integration/cbt-completions.bash +++ b/shell-integration/cbt-completions.bash @@ -1,11 +1,13 @@ -#!/bin/bash +# this does currently not support for completion of nested methods, e.g. snapshot.comp +# bash 4 should be able to do that via $READLINE_LINE and $READLINE_POINT, see +# http://unix.stackexchange.com/questions/106761/simulating-readline-line-in-bash-4-0/106832 __cbt() { local cur prev opts COMPREPLY=() cur="${COMP_WORDS[COMP_CWORD]}" prev="${COMP_WORDS[COMP_CWORD-1]}" - opts="$(cbt taskNames)" + opts="$(cbt complete)" COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) return 0 } -- cgit v1.2.3