[Geany] vte hazard

Enrico Tröger enrico.troeger at xxxxx
Wed Dec 5 19:04:56 UTC 2007


On Wed, 5 Dec 2007 12:08:55 -0600, "Jeff Pohlmeyer"
<yetanothergeek at gmail.com> wrote:

> On Dec 5, 2007 9:19 AM, Enrico Tröger <enrico.troeger at uvena.de> wrote:
> 
> > I'm not sure at all whether the way I did it in the patch is good,
> > whether we should it in this way or whether there is any better way
> > (I hope so).
> 
> Here is another idea -
> This patch issues a {HOME} escape sequence before "typing" the
> command, and then adds a " #" comment marker after it, so anything
> already on the command line becomes a comment.
> 
> It seems to work for me, but I'm not sure if  the "\e[H" escape
> sequence is valid
> for all keyboards.
> 
> It also won't work unless the {HOME} key is bound to
> "beginning-of-line" (I assume that it is for most humans).
Nice idea but doesn't work in zsh and dash (both with default
configurations tested on Debian Testing). Additionally, zsh seems to
have problems with the '#' in a command: cd /tmp #
doesn't work in zsh.

I don't know much about shells(just using bash and being happy ;-)),
the manual page for dash doesn't mention any escape sequences at
all ;-(.

Just another idea(probably not better):
In the key-press event handler we look for any typed characters (or for
a changed cursor position) and if found, we mark the VTE as "dirty" so
that commands can't be run until the user marked the VTE as clean again
(e.g. by restarting it).

Regards,
Enrico

-- 
Get my GPG key from http://www.uvena.de/pub.key
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.geany.org/pipermail/users/attachments/20071205/8798ef74/attachment.pgp>


More information about the Users mailing list