소스 검색

Simplified bash-completion script

pull/3/head
Tuncer Ayaz 15 년 전
부모
커밋
ba306ec183
1개의 변경된 파일8개의 추가작업 그리고 19개의 파일을 삭제
  1. +8
    -19
      priv/shell-completion/bash/rebar

+ 8
- 19
priv/shell-completion/bash/rebar 파일 보기

@ -15,30 +15,19 @@ _rebar()
if [[ ${cur} == --* ]] ; then
COMPREPLY=( $(compgen -W "${lopts}" -- ${cur}) )
if [ -n "$COMPREPLY" ] ; then
# append space if matched
COMPREPLY="${COMPREPLY} "
# remove trailing space if --lopt=value option
COMPREPLY=${COMPREPLY/%= /=}
fi
return 0
elif [[ ${cur} == -* ]] ; then
COMPREPLY=( $(compgen -W "${sopts}" -- ${cur}) )
if [ -n "$COMPREPLY" ] ; then
# append space if matched
COMPREPLY="${COMPREPLY} "
fi
return 0
else
COMPREPLY=( $(compgen -W "${cmdsnvars}" -- ${cur}) )
if [ -n "$COMPREPLY" ] ; then
# append space if matched
COMPREPLY="${COMPREPLY} "
# remove trailing space if var= option
COMPREPLY=${COMPREPLY/%= /=}
fi
return 0
fi
if [ -n "$COMPREPLY" ] ; then
# append space if matched
COMPREPLY="${COMPREPLY} "
# remove trailing space after equal sign
COMPREPLY=${COMPREPLY/%= /=}
fi
return 0
}
complete -o nospace -F _rebar rebar

불러오는 중...
취소
저장