Using bash function + grc like an alias breaks Zsh completion -


i'm using grc / grcat colorize terminal output function:

function docker() {   case $* in     ps* ) shift 1; command docker ps "$@" | grcat $home/.grc/conf.dockerps ;;     images* ) shift 1; command docker images "$@" | grcat $home/.grc/conf.dockerimages ;;     info* ) shift 1; command docker info "$@" | grcat $home/.grc/conf.dockerinfo ;;     * ) command docker "$@" ;;   esac } 

but breaking zsh completions , plugins setup using oh-my-zsh in .zshrc this:

plugins=(git colored-man-pages colorize vagrant brew ruby docker) plugins+=(gradle rvm rails bundler gem osx pod) plugins+=(bower cp go node npm) plugins+=(zsh-syntax-highlighting encode64) plugins+=(zsh-completions mvn)  fpath=(~/.zsh/completion $fpath)  autoload -uz compinit && compinit -i 

when try using docker stop example, completion coming ansi escape sequences: $'\033'\[0m$'\033'\[1m$'\033'\[33mhigh_wright$'\033'\[0m

is there way avoid , filter escape sequences completions?

edit

i found file in .oh-my-zsh dir docker plugin: https://github.com/robbyrussell/oh-my-zsh/blob/master/plugins/docker/_docker

i understand need change function don't know how.

__docker_containers() {     declare -a cont_cmd     cont_cmd=($(docker ps | awk 'nr>1{print $nf":[con("$1")"$2"("$3")]"}'))     if [[  'x$cont_cmd' != 'x' ]]         _describe 'containers' cont_cmd } 

i able fix changing docker plugin oh-my-zsh installed in .oh-my-zsh/plugins/docker/_docker. fix preceded helper functions command this:

__docker_containers() {     declare -a cont_cmd     cont_cmd=($(command docker ps | awk 'nr>1{print $nf":[con("$1")"$2"("$3")]"}'))     if [[  'x$cont_cmd' != 'x' ]]         _describe 'containers' cont_cmd } 

Comments

Popular posts from this blog

wordpress - (T_ENDFOREACH) php error -

Export Excel workseet into txt file using vba - (text and numbers with formulas) -

Using django-mptt to get only the categories that have items -