vte widget improvement idea



Hi

I'm not sure this is the right place to ask this. I want to implement a new
feature for the vte widget so I am interested to hear the opinion of other
people about this.

Sometimes I think I have something in the clipboard and paste it into the
terminal just to realize I had something else (which is multiline). This
can be dangerous. Also, it is not clear what will happen when pasting
something copied from a website and it's cumbersome to check the clipboard
every time.
Both these problems can be avoided with user discipline but I believe there
should be a way to reduce the possibility of making such mistakes.

My idea is to add a setting (something like
vte_terminal_set_paste_escape()) that, when turned on, escapes the
dangerous characters (unquoted line feeds) from the clipboard text and then
pastes.

After some thinking I am no longer sure if implementing this will be easy
(or even possible).
What I see as a problem is that the widget has to know if the pasted text
goes to the shell or something else (e.g. text editor). One possible
solution is to see whether the foreground process group of the terminal is
the one of the starte
d shell (this can be obtained with tcgetpgrp()).

Any thoughts on this feature? Do you think this is a good idea? Any
suggestions?


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]