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

completion hacking



Could this be written in a better way?

cvsignore="*~ *# .#* *.o *.a CVS . .."

cvsaddp() {
    setopt localoptions nullglob
    [[ -e CVS/Entries ]] && reply=(`(sed -ne 's:^/\([^/]*\)/.*$:E\1:p' -e 's:^/\([^/]*\)/-.*$:E\1:p' <CVS/Entries; ( ls -a1 | sed 's:^\(.*\)$:D\1:g' ); (ls -ad1 $(echo "$cvsignore"; cat .cvsignore 2>/dev/null  ) 2>/dev/null | sed 's:^\(.*\)$:I\1:g' ) ) | sort +0.1 | uniq --skip-chars=1 -u | sed -ne 's/^[^I]\(.*\)$/\1/p'`)
}

The goal (which is reached) is to get a list of all possible things
that could be sent to "cvs add".

__________________________________________________________________________
Idonex AB               Telefon      Telefax      nalle
Skolgatan 10		013-376814   013-376801   0708-376867
582 34 Linköping        mirar@xxxxxxxxx           http://www.idonex.se/



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