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

cvsaddp and cvsremovep in compctl-examples



The number of pipelines and external commands involved is silly, especially
when most of what they do is already done by cvstargets.

cvsremovep() {
    cvstargets
    setopt localoptions extendedglob
    local omit
    omit=(*(D))
    eval 'reply=( ${reply:#('${(j:|:)omit}')} )'
}

cvsaddp() {
    cvstargets
    setopt localoptions extendedglob
    local all omit
    all=(*(D))
    omit=( $reply $=cvsignore )
    [[ -r ~/.cvsignore ]] && omit=( $omit $(<~/.cvsignore) )
    [[ -r .cvsignore ]] && omit=( $omit $(<.cvsignore) )
    eval 'reply=( ${all:#('${(j:|:)omit}')} )' 
}

-- 
Bart Schaefer                                 Brass Lantern Enterprises
http://www.well.com/user/barts              http://www.brasslantern.com



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