Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: experimental new style completion



I wrote:

> ...
>
> Most importantly it contains a
> function showing the use of `compadd': with this function it is easy
> to get partial-path completion for almost anything (including what was 
> previously `-g' patterns).
>
> ...

I forgot to handle fignore inside this function.

Bye
 Sven

*** Src/example.old	Fri Jan 22 15:47:54 1999
--- Src/example	Fri Jan 22 15:48:18 1999
***************
*** 238,243 ****
--- 238,244 ----
        s=( "${(@)s:gs.**.*.}" )
        for i in $a; do
          b=( $~i/(#l)$~s )
+         eval b\=\( \$\{b:/\*\(${(j:|:)fignore}\)\} \)
          [[ $#b -ne 0 ]] && c=( $c $i )
        done
        if [[ $#c -eq 0 ]] then
***************
*** 245,250 ****
--- 246,252 ----
        elif [[ $#c -ne 1 ]] then
          a="$epre$pa"
          c=( $~c/(#l)$~s )
+         eval c\=\( \$\{c:/\*\(${(j:|:)fignore}\)\} \)
  	c=( ${c#$a} )
          for i in $c; do
            compadd -p "$pre$pa" -W "$a" -s "/${i#*/}" -f "${i%%/*}"
***************
*** 261,266 ****
--- 263,269 ----
    s=( $str$@ )
    s=( "${(@)s:gs.**.*.}" )
    b=( $~a(#l)$~s )
+   eval b\=\( \$\{b:/\*\(${(j:|:)fignore}\)\} \)
    compadd -p "$pre$pa" -W "$epre$pa" -f ${b#$a}
  }
  

--
Sven Wischnowsky                         wischnow@xxxxxxxxxxxxxxxxxxxxxxx



Messages sorted by: Reverse Date, Date, Thread, Author