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

Re: Completion function for bitkeeper?



Bart Schaefer wrote:
> Word splitting is vastly different in the two cases.  It happens within
> the words of $action in the second case, but does not in the first case.

Oliver simplified a bit; there's an eval in the first case as well,
which complicates the issue:

              elif [[ "$action" = \{*\} ]]; then

                # A string in braces is evaluated.

                while _next_label "$subc" expl "$descr"; do
                  eval "$action[2,-2]" && ret=0
                done
                (( ret )) && alwopt=${alwopt:-yes}
	        tried=yes
              elif [[ "$action" = \ * ]]; then

                # If the action starts with a space, we just call it.

	        eval "action=( $action )"
                while _next_label "$subc" expl "$descr"; do
                  "$action[@]" && ret=0
                done
                (( ret )) && alwopt=${alwopt:-yes}
	        tried=yes

-- 
Peter Stephenson <pws@xxxxxxx>                  Software Engineer
CSR Ltd., Science Park, Milton Road,
Cambridge, CB4 0WH, UK                          Tel: +44 (0)1223 692070


**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.

This footnote also confirms that this email message has been swept by
MIMEsweeper for the presence of computer viruses.

www.mimesweeper.com
**********************************************************************



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