zsh-users
 help / color / mirror / code / Atom feed
* replacing current word in user-defined widget?
@ 2001-06-06 17:41 Adam Spiers
  2001-06-06 19:53 ` Bart Schaefer
  0 siblings, 1 reply; 2+ messages in thread
From: Adam Spiers @ 2001-06-06 17:41 UTC (permalink / raw)
  To: zsh users mailing list

I was trying to write a make-path-absolute type of widget that
replaces the pathname which is the current word with an absolute path,
but I got stuck trying to write code which figures out where the
current word starts and ends.  Presumably it involves looking at
$BUFFER and $CURSOR, and maybe doing word splitting with ${(z)BUFFER}
or similar, but beyond that I don't have much of a clue :-)
Completion widgets seem to have it a lot easier, since they're given
the $words array to mess around with.

Any suggestions?


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2001-06-06 19:57 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-06-06 17:41 replacing current word in user-defined widget? Adam Spiers
2001-06-06 19:53 ` Bart Schaefer

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).