Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Howto to print ENTER to zle-buffer?
- X-seq: zsh-users 22213
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: zsh-users@xxxxxxx
- Subject: Re: Howto to print ENTER to zle-buffer?
- Date: Tue, 13 Dec 2016 08:12:30 -0800
- Cc: Andy Spiegl <zsh.Andy@xxxxxxxxx>
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brasslantern-com.20150623.gappssmtp.com; s=20150623; h=from:message-id:date:in-reply-to:comments:references:to:subject:cc :mime-version; bh=3hgCcSrAPppw7fit4P13OMRIu6eLBJtddDuu+9UoK6k=; b=OqgUi1uK0es9FOFK98/KN9teiMwo5nYLTWfMnoNwYIkufdRTsZimWrEK6NC5CkRbuz lBWWW94pyyZe03BO8mFpl+QRu63Rph9eYKNfpRgvKiE6//DTR0hJP2DBApZxV57cwHaP MjLPgfVH84giOGkfryAp1pQ2Yo5QOgIsxMHV7wOGl4oZB8g7K6duuAeThGmXjbABaKVO pKlda+jCMnuFhnXHdchHuGYlG8Sk80OFXDxkqGEudvZwgCkV7fb8Pwaqvy52S9cOcCnL +TgP43xMlQLpLvxIW+wj5ERLtd2nZq0ZqydzIZ1QhQHgsHC7LnHV85kwwS0KrzJh2xoZ TEug==
- In-reply-to: <20161213150101.lgcl6r44gc5b4sia@spiegl.de>
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
- References: <20161213150101.lgcl6r44gc5b4sia@spiegl.de>
On Dec 13, 4:01pm, Andy Spiegl wrote:
}
} print -z "command-to-run args"
} zle accept-line
}
} Can zsh be told somehow to "press enter"?
If you're doing this in a startup file, you probably want
print -S "command-to-run args"
command-to-run args
That is, explicitly place the command into the history, and then run
it directly.
If for some reason you really need the command executed within ZLE,
you will have to create a zle-line-init widget that will accept the
line and then remove or update itself that so it doesn't run it a
second time.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author