Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
completion hacking
- X-seq: zsh-users 1202
- From: Mirar <mirar@xxxxxxxxxx>
- To: Andrew Main <zefram@xxxxxxxxx>
- Subject: completion hacking
- Date: 15 Dec 1997 00:03:26 +0100
- Cc: sweth@xxxxxxxxxxxxxxxxxxxx, zsh-users@xxxxxxxxxxxxxxx
- In-reply-to: Mirar's message of "12 Dec 1997 22:06:14 +0100"
- References: <199712122059.UAA22463@xxxxxxxxxxxxxxxx> <82yb1qxoe1.fsf@xxxxxxxxxxxxxxxxxxx>
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