BTS

Issue407

Title zsh: integrate commit-to-history into grml's zsh?
Priority wish Status resolved
Superseder Nosy List ft, mika, z3ttacht
Assigned To ft Topics configs, grml-etc-core, zsh

Created on 2008-02-13.20:22:38 by mika, last changed 2009-04-04.10:31:08 by ft.

Messages
msg2126 (view) Author: ft Date: 2009-04-04.10:31:08
We believe that your issue has been closed by the upload of
Version 0.3.66 of grml-etc-core from Frank Terbeck <ft@grml.org>.
The explanation is attached below

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Format: 1.8
Date: Sat, 04 Apr 2009 11:52:50 +0200
Source: grml-etc-core
Binary: grml-etc-core
Architecture: source all
Version: 0.3.66
Distribution: unstable
Urgency: low
Maintainer: Michael Prokop <mika@grml.org>
Changed-By: Frank Terbeck <ft@grml.org>
Description: 
 grml-etc-core - core ecetera files for the grml system
Changes: 
 grml-etc-core (0.3.66) unstable; urgency=low
 .
   * vimrc: only set screen title if the caller explicitly asks for it.
   * zshrc: ask for setting screen title in vim via a wrapper function.
   * zshrc: only compdef commands to _gnu_generic if no native completion
     exists.
   * zshrc: add commit-to-history widget, that allows users to add
     command lines to zsh's history without executing [Closes: issue407]
   * zshrc: add a handler that uses debian's command-not-found package
     if an external command could not be found. [Closes: issue564]
Checksums-Sha1: 
 aa1cde8a633f5e920c7a3f379c17bdcc6a1814a4 873 grml-etc-core_0.3.66.dsc
 5fa626b168a9308a2c3207b14a9a72ab6acb7fd7 109117 grml-etc-core_0.3.66.tar.gz
 42ed7458ffa868d38f68f7eb698dfe0921e61d3b 111632 grml-etc-core_0.3.66_all.deb
Checksums-Sha256: 
 3571db06a08d158c0d656276aecd45073f549bd49d9e0005376d9b4c94b9058f 873 grml-etc-core_0.3.66.dsc
 10c0700f40a7596f9cbb61172c12ac25228b71bf1a85dc79cec071c08dc55a0f 109117 grml-etc-core_0.3.66.tar.gz
 909e639605b737166667459981e4f3d56f8e191bf05a5a7ff3b6492cab832a8d 111632 grml-etc-core_0.3.66_all.deb
Files: 
 ca629360808724690f7abbc0286a710e 873 grml optional grml-etc-core_0.3.66.dsc
 6be50e7b29a2f4e38f3866b92005c466 109117 grml optional grml-etc-core_0.3.66.tar.gz
 e92bd3fdd6cdd7485f9c4b63fee751f1 111632 grml optional grml-etc-core_0.3.66_all.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)

iD8DBQFJ1zXR2N9T+zficugRArmpAJ9PNzTHmkpD7V2pzbwuriwCw8eFDACePn6p
LfWP0IVKQTODX9iOauDhYIs=
=b7OB
-----END PGP SIGNATURE-----
msg2124 (view) Author: ft Date: 2009-04-03.20:58:33
Long time no see for this bug, too. Sorry about that.

I looked at 'sticky-notes' by now. I wouldn't use that thing, ever.
I really think, users who want it should load that function on their
own via .zshrc.local. If anybody disagrees, open a new issue about
'sticky-notes'.

I said it before, 'commit-to-history' is probably useful for some
people and since it's a short, simple and straight-forward widget, I
think we should take it. I'll bind it to '^x^h' as suggested.

If somebody wonders where 'commit-to-history came from, the msg-id
mika pointed to earlier corresponds to this message:
    http://article.gmane.org/gmane.comp.shells.zsh.devel/14183

Pushed:
    http://git.grml.org/?p=grml-etc-core.git;a=commitdiff;h=b28a9ffd7f5ad83fba4d58502a62c7fe32c2f092

Regards, Frank
msg1216 (view) Author: ft Date: 2008-02-22.19:55:57
Alexander Steinböck <bts@bts.grml.org>:
> Alexander Steinböck <z3ttacht@grml.org> added the comment:
> * Michael Prokop <bts@bts.grml.org> [2008-02-13 21:22]:
[...]
> >    commit-to-history() {
[...]
> > What do you think about that?

I'm all for this one. (Though, I don't see an immediate need for
myself, yet) - Anyway, it *is* useful.

I'll check this one and the sticky note thing out.

Should I delay pushing to the public repository until after the
release or are we building .debs from the latest tagged commit?

> [1] Apropos, do we care for setting inc_append_history instead of
> append_history in /etc/zsh/zshrc?

Why? - I don't like this one. It messes with the history of a running
shell, which prevents me from having one shell open for this task one
for the other... - I *really* dislike this option; but I am aware that
there are people who do like that behaviour; So, if it must be set for
grml, go ahead. I'd just like to see a good reason it. Just once :-)

Regards, Frank
msg1188 (view) Author: z3ttacht Date: 2008-02-13.21:34:51
* Michael Prokop <bts@bts.grml.org> [2008-02-13 21:22]:
> Quoting Message-ID:
> <237967ef0801040304h494987bv939bf6ff9541123f@mail.gmail.com> from zsh-user-ML:
> And I have this custom widget to help me store a command line in history
> without executing it:
>
>    commit-to-history() {
> [...]
> What do you think about that?
I have to admit, I've never had to store something in the history so
far. For delaying commands, for me, push-line respectively
push-line-or-edit did suffice.
But this widget's different, as one can use it in another invoked
shell, assumed share_history and {inc_,}append_history[1] are set, I
guess.

So yes, I see some additional benefit for grml integrating this
widget.

                   ---------- Footnotes ----------

[1] Apropos, do we care for setting inc_append_history instead of
append_history in /etc/zsh/zshrc?
msg1187 (view) Author: mika Date: 2008-02-13.20:23:51
And please also check out 'autoload -U sticky-note' by Bart. :)
msg1186 (view) Author: mika Date: 2008-02-13.20:22:37
Quoting Message-ID: 
<237967ef0801040304h494987bv939bf6ff9541123f@mail.gmail.com> from zsh-user-ML:

#######################################################################
And I have this custom widget to help me store a command line in history
without executing it:

   commit-to-history() {
      print -s ${(z)BUFFER}
      zle send-break
   }
   zle -N commit-to-history
   bindkey "^X^H" commit-to-history

So, I type a command, hit Ctrl-X Ctrl-H, and then retrieve my command
from history when I need it.
#######################################################################

What do you think about that?
History
Date User Action Args
2009-04-04 10:31:08ftsetstatus: fixed-in-git -> resolved
nosy: mika, ft, z3ttacht
messages: + msg2126
2009-04-03 20:58:35ftsetstatus: chatting -> fixed-in-git
nosy: mika, ft, z3ttacht
messages: + msg2124
2009-03-22 15:39:47ftsetnosy: mika, ft, z3ttacht
assignedto: ft
2008-02-22 19:55:59ftsetnosy: mika, ft, z3ttacht
messages: + msg1216
2008-02-13 21:34:52z3ttachtsetnosy: mika, ft, z3ttacht
messages: + msg1188
2008-02-13 20:23:51mikasetstatus: unread -> chatting
nosy: mika, ft, z3ttacht
messages: + msg1187
2008-02-13 20:22:38mikacreate