Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
populate next comand line from precmd
- X-seq: zsh-users 23473
- From: Pier Paolo Grassi <pierpaolog@xxxxxxxxx>
- To: zsh-users@xxxxxxx
- Subject: populate next comand line from precmd
- Date: Wed, 13 Jun 2018 03:44:28 +0200
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=ug2jNqF+xTSyaqe/dZI19Ll+hbGaOV7camo/BpLiz0U=; b=A9A+KBc8bAn+76Y+u2C0shy8MZg7rYBgS9fkam07whjOKq+zjcSOXT/6r5texHhnBq WoG48jkHIDiGTDYc3Levd/dsPBQ/4RPW9xnv+cn62SmRk2DB90EnEbAUPF2VdGorIXZg rjX4qr3o2P4Dpzt3qtuFhzE7cn/+xhg4Q1EAd72/hqYyALMP86SMAcecjGt184wyPehl Y2B0qa9aXaA1cKR2r3SM9q8nLLKD5g5VBm/0do4nG+YFdbK7S3iza9mk3V5YPpArdkSI SqRx30wfXPLhK3Gop4i6edWMVXs6vw3MnGI1nFG4QBVLMTwQYAzmLejPnvp5/XjndPDI +sLg==
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- List-unsubscribe: <mailto:zsh-users-unsubscribe@zsh.org>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
hello, I was wondering if it is somehow possibile to populate the command
line within the precmd function. What I am trying to achieve is: from a
normal function (not a zle widget) I would like to set some variable, to be
read in the precmd function where it is used to populate the next command
line and also set the cursor position. I know how to do it from a widget,
but from what I know there is no way of doing this from outside a widget,
am I right?
the desidered behaviour would be:
$ special_function par par2 etc [accept-line]
output
$ special_function par par2 etc (already compiled, some params may be
modified)
I don't want to:
modify the accept-line widget
modify history so that the modified version of the line is at a press of
the up key
this is more of a "can this be done in this way?" question
thanks in advance
--
Pier Paolo Grassi
email: pierpaolog@xxxxxxxxx
linkedin: https://www.linkedin.com/in/pier-paolo-grassi-19300217
founder: https://www.meetup.com/it-IT/Machine-Learning-TO
Messages sorted by:
Reverse Date,
Date,
Thread,
Author