On Thu, Apr 21, 2005 at 08:38:34PM +0200, Julius Plenz wrote:
> Recently, I came across the idea to bind a key to insert the current
> date, just like I bound keys to insert things using "stuff".
>
> However, I tried :bind d exec ! date +%Y-%m-%d. That almost works like
> expected. I couldn't figure out exactly, but screen adds some strange
> control character before or after the command.
>
> Why doesn't this work? How do I realize to insert the current date?
[...]
If you want the output of that command to be inserted as if
typed from the keyboard, then, it should be exec .!.
Note that date outputs a trailing NL (^J) character, that may be
what you get.
:bind d exec .!. zsh -c 'print -Pn %D{%F}'
--
St�phane
_______________________________________________
screen-users mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/screen-users