mirror of
https://github.com/binwiederhier/ntfy.git
synced 2026-05-09 08:26:00 +02:00
[PR #1615] [MERGED] Add comment for zsh users in the terminal example #1662
Labels
No labels
ai-generated
android-app
android-app
android-app
🪲 bug
build
build
dependencies
docs
enhancement
enhancement
🔥 HOT
in-progress 🏃
ios
prio:low
prio:low
pull-request
question
🔒 security
server
server
unified-push
web-app
website
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/ntfy#1662
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/binwiederhier/ntfy/pull/1615
Author: @benkenawell
Created: 2/18/2026
Status: ✅ Merged
Merged: 2/19/2026
Merged by: @binwiederhier
Base:
main← Head:example/zsh-terminal📝 Commits (1)
046c0e8Add comment for zsh users in the terminal example📊 Changes
1 file changed (+3 additions, -1 deletions)
View changed files
📝
docs/examples.md(+3 -1)📄 Description
Bash and Zsh terminals' history works slightly different. In bash, the current command is in the history already. In zsh, the history command does not have the currently running command in it. But it does set the HISTCMD variable to the entry number for the current command. So we can load the current command with
history "$HISTCMD"in zsh and apply the same sed filter to get the same result as the bashhistory | tail -n1command.I think it makes more sense to leave this as a comment in the current example than to create a new example, since it otherwise works the exact same. I've added this to my workflow locally on my Mac and it works great! It took me a while to figure out the history difference though, so I thought it worth contributing back for zsh users.
Thank you for such a great and flexible piece of software!
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.