picolisp

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

bash_completion (520B)


      1 # Bash completion for picolisp + pil
      2 # Alexander Burger <abu@software-lab.de>
      3 
      4 have pil &&
      5 _pil()
      6 {
      7     local -a ARGS
      8     local IFS=$'\n'
      9 
     10     for A in "${COMP_WORDS[@]:1:$((COMP_CWORD-1))}"
     11     do
     12         test "${A:0:1}" = "-" || ARGS[${#ARGS[@]}]="${A//\\ / }"
     13     done
     14     COMPREPLY=($(${COMP_WORDS[0]} ${ARGS[@]} /usr/lib/picolisp/lib/complete.l "${COMP_WORDS[$COMP_CWORD]}" -bye + 2>&1))
     15     return 0
     16 } &&
     17 complete -o nospace  -F _pil  picolisp  &&
     18 complete -o nospace  -F _pil  pil
     19 
     20 # ex: ts=4 sw=4 et filetype=sh