Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Another patch to compctl-examples CVS compctl, and a bug?
- X-seq: zsh-workers 1657
- From: "Bart Schaefer" <schaefer@xxxxxxxxxxxxxxxxxxxxxxx>
- To: Zoltan Hidvegi <hzoli@xxxxxxxxxx>, zsh-workers@xxxxxxxxxxxxxxx
- Subject: Re: Another patch to compctl-examples CVS compctl, and a bug?
- Date: Mon, 15 Jul 1996 10:02:04 -0700
- In-reply-to: "Bart Schaefer" <schaefer@xxxxxxxxxxxxxxxxxxxxxxx> "Re: Another patch to compctl-examples CVS compctl, and a bug?" (Jul 15, 12:03am)
- References: <199607150102.DAA03226@xxxxxxxxxxxxx> <960715000308.ZM3130@xxxxxxxxxxxxxxxxxxxxxxx>
- Reply-to: schaefer@xxxxxxx
On Jul 15, 12:03am, Bart Schaefer wrote:
} Subject: Re: Another patch to compctl-examples CVS compctl, and a bug?
}
} Here's a patch, to be applied on top of my last patch, that incorporates
} some of the changes suggested by the discussion. It avoids using $(<...)
} construct on nonexistent files because of the stray newline that appears.
Seems Zoltan and I had similar thoughts on this ... but you don't need the
2>/dev/null redirection if you're testing ahead of time for the existence
of the CVS/Entries file. Here's my same patch except against 3.0-pre3.
*** Misc/compctl-examples.0 Mon Jul 15 00:07:16 1996
--- Misc/compctl-examples Mon Jul 15 09:57:31 1996
***************
*** 439,449 ****
pref=
fi
[[ -n "$pref" && "$pref" != */ ]] && pref=$pref/
! if [[ -f "${pref}CVS/Entries" ]] then
! reply=( "${pref}${^${${(f@)$(cat ${pref}CVS/Entries 2> /dev/null)}#/}%%/*}"
! ${pref}*/**/CVS(:h) )
else
! reply=( ${pref}*/**/CVS(:h) )
fi
}
#------------------------------------------------------------------------------
--- 439,450 ----
pref=
fi
[[ -n "$pref" && "$pref" != */ ]] && pref=$pref/
! if [[ -f ${pref}CVS/Entries ]]
! then
! reply=( "${pref}${^${${(f@)$(<${pref}CVS/Entries)}#/}%%/*}"
! ${pref}*/**/CVS(:h) )
else
! reply=( ${pref}*/**/CVS(:h) )
fi
}
#------------------------------------------------------------------------------
--
Bart Schaefer Brass Lantern Enterprises
http://www.well.com/user/barts http://www.nbn.com/people/lantern
New male in /home/schaefer:
>N 2 Justin William Schaefer Sat May 11 03:43 53/4040 "Happy Birthday"
Messages sorted by:
Reverse Date,
Date,
Thread,
Author