Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: append to history entry?
- X-seq: zsh-users 22284
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: zsh-users@xxxxxxx
- Subject: Re: append to history entry?
- Date: Mon, 26 Dec 2016 20:47:29 -0800
- 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 :mime-version; bh=/GuPcIFararhiTzn7KGY5r+i5FZNVAO4KkGA5PyDat4=; b=MPTKZZckM6mAxByqK0x4z9hsqvVwRAHTfM2egJ4sOTPNMGRimio8/1EVkkJEKlFlVG dygByy1zqj1SX1Ife4X47v9gJ7byzF3QVEY3TZ6L1O/zbliHieVWyFG1I9Ai6CR3BmMc V1jvrbKcs00YmMhNzGFz/eb3PTl4JaZaY1g9k09XpTFkvsmHu58VLifUK+su4ogIBIQ9 NCDdXPmmGKcaH4PybWXksRBGCazz0QBxxYkqhq+9etlDBu6l4thLDRBPb7ulmqWzXhmw oPz//6L1kimtFxYZtm4Ar+3rZbjYsolnI9ZO3nFcJJzdwufxmHEkOYDm3hh8VV3hggf/ 5Bzw==
- In-reply-to: <5288b537-f06a-d18a-60ea-1f962856c80c@eastlink.ca>
- 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: <a18cf6d4-9fcb-7758-599e-4a56d2258824@eastlink.ca> <5288b537-f06a-d18a-60ea-1f962856c80c@eastlink.ca>
On Dec 26, 5:28pm, Ray Andrews wrote:
} Subject: Re: append to history entry?
}
} On 26/12/16 03:16 PM, Ray Andrews wrote:
} > Can I arrange for a function to append something to it's own entry
} > into history when it is run?
You might also want to look at the zshaddhistory hook function.
} This seems to work:
} ...
} Leading space keeps the command out of history as usual, then I just
} replace it with the massaged version.
This looks fine. My only suggestion would be to use the ":" command
instead of "echo".
Messages sorted by:
Reverse Date,
Date,
Thread,
Author