picolisp

Unnamed repository; edit this file to name it for gitweb.
git clone https://logand.com/git/picolisp.git/
Log | Files | Refs | README | LICENSE

commit ab66dafd84a9f4475fa5c778b7b957c5a772df32
parent 48d595248fe92e88d7c519c7ce7271b0d1d623c3
Author: Alexander Burger <abu@software-lab.de>
Date:   Tue,  3 Apr 2012 16:30:41 +0200

Completion handling clean-up
Diffstat:
Mlib/bash_completion | 13++++++-------
1 file changed, 6 insertions(+), 7 deletions(-)

diff --git a/lib/bash_completion b/lib/bash_completion @@ -4,15 +4,14 @@ have pil && _pil() { - local CMD=$( - echo ${COMP_WORDS[0]} - for ARG in "${COMP_WORDS[@]:1:$((COMP_CWORD-1))}" - do - test "${ARG:0:1}" = "-" || echo "$ARG" - done ) + local -a ARGS local IFS=$'\n' - COMPREPLY=($($CMD /usr/lib/picolisp/lib/complete.l "${COMP_WORDS[$COMP_CWORD]}" -bye + 2>&1)) + for A in "${COMP_WORDS[@]:1:$((COMP_CWORD-1))}" + do + test "${A:0:1}" = "-" || ARGS[${#ARGS[@]}]="${A//\\ / }" + done + COMPREPLY=($(${COMP_WORDS[0]} ${ARGS[@]} /usr/lib/picolisp/lib/complete.l "${COMP_WORDS[$COMP_CWORD]}" -bye + 2>&1)) return 0 } && complete -o nospace -F _pil picolisp &&