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

Re: (backward-)kill-argument



On Mar 15,  3:31pm, I wrote:
}
}             words="${(z)LBUFFER}"
}             while [[ "${${(@M)words:#[\{\}]}[-1]}" == '{' ]]
}             do
}                 LBUFFER="${LBUFFER%${words[-1]}[[:space:]]#}"
}                 words="${(z)LBUFFER}"
}             done

I suppose that could be done slightly faster as

            words[-1]=()
            while [[ "${${(@M)words:#[\{\}]}[-1]}" == '{' ]]
            do
                LBUFFER="${LBUFFER%${words[-1]}[[:space:]]#}"
                words[-1]=()
            done

if it really is the case that deleting from the end of the string won't
change the (z) parse?

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

Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net   



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