From e4f46014847720c75d664c6dd5bd3fedb8961f69 Mon Sep 17 00:00:00 2001 From: crater2150 Date: Sun, 11 Jan 2026 14:06:54 +0100 Subject: [PATCH 1/2] new script: git-cherry-select --- devel/git-cherry-select | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100755 devel/git-cherry-select diff --git a/devel/git-cherry-select b/devel/git-cherry-select new file mode 100755 index 0000000..91a01b8 --- /dev/null +++ b/devel/git-cherry-select @@ -0,0 +1,9 @@ +#!/bin/zsh +#dep:fzf git +if [[ -z $1 || $1 == "-h" || $1 == "--help" ]]; then + echo "Usage: ${0:t} " + exit 1 +fi +git log --oneline HEAD..$1 \ + | fzf -m --preview "echo {} | awk '\$0=\$1' | xargs git show --color=always" \ + | awk '$0=$1' | xargs git cherry-pick From f546b49599bd49b42576be4aa295d1d0832be0ea Mon Sep 17 00:00:00 2001 From: crater2150 Date: Sun, 11 Jan 2026 14:07:22 +0100 Subject: [PATCH 2/2] new script: atuin-context --- misc/atuin-context | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100755 misc/atuin-context diff --git a/misc/atuin-context b/misc/atuin-context new file mode 100755 index 0000000..130dcaf --- /dev/null +++ b/misc/atuin-context @@ -0,0 +1,17 @@ +#!/bin/zsh +#dep:atuin fzf +zparseopts -D -E A:=after_minutes B:=before_minutes C:=context_minutes + +if [[ $context_minutes ]]; then + after_minutes=${context_minutes[2]} + before_minutes=${context_minutes[2]} +else + after_minutes=${after_minutes[2]:-5} + before_minutes=${before_minutes[2]:-0} +fi + +command_timestamp=$(atuin search | fzf --tac | awk '{ print $1, $2 }' | xargs -I{} -0 date --date={} +%s) +start_time=$(date --date=@$(( command_timestamp - before_minutes * 60)) --iso-8601=seconds) +end_time=$(date --date=@$(( command_timestamp + after_minutes * 60)) --iso-8601=seconds) + +atuin search --after=$start_time--before=$end_time