This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Inspired by: https://github.com/elecdeer/dotfiles/blob/14604501ed14095f30ba9d0240b6dc0f50a6dc90/hanger/plugins/on-demand-completion/on-demand-completion.plugin.zsh | |
| # | |
| # usage: lazy_completion <command_name> [completion_command] | |
| # Example: | |
| # lazy_completion 'gh' 'gh completion -s zsh' | |
| lazy_completion() { | |
| local cmd_name=$1 | |
| local completion_command="$2" | |
| local function_name="_${cmd_name}" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env zsh | |
| FETCH_INTERVAL_SECONDS=900 # 15 minutes | |
| _should_fetch() { | |
| # Do nothing if not inside a git repository | |
| command git rev-parse --is-inside-work-tree &>/dev/null || return 1 | |
| local git_dir="$(realpath "$(git rev-parse --git-dir 2>/dev/null)")" | |
| local last_fetch_file="${git_dir}/SUSHICHAN044_last_auto_fetch_time" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/sh | |
| __ensure_memo_base_directory() { | |
| local memo_dir="$(pwd)/.sushichan044/memo" | |
| mkdir -p "$memo_dir" | |
| echo "$memo_dir" | |
| } | |
| memo() { | |
| local provided_name="$1" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #! /usr/bin/env node | |
| // @ts-check | |
| /** | |
| * @fileoverview Send a macOS notification with the last message content from a Claude transcript. | |
| */ | |
| import { execFileSync } from "node:child_process"; | |
| import { readFileSync } from "node:fs"; | |
| import path from "node:path"; | |
| import os from "node:os"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/sh | |
| # execute typescript with node.js | |
| nts() { | |
| if ! type "node" >/dev/null 2>&1; then | |
| echo "node is not installed" | |
| return 1 | |
| fi | |
| if ! type "npx" >/dev/null 2>&1; then |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "theme": "Atom One", | |
| "autoAccept": true, | |
| "checkpointing": { | |
| "enabled": true | |
| }, | |
| "usageStatisticsEnabled": false | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/zsh | |
| # fzf-based git worktree selector | |
| # Inspired by: | |
| # - https://www.mizdra.net/entry/2024/10/19/172323 (git branch selection patterns) | |
| # | |
| # Usage: | |
| # - Direct: fzf-worktree | |
| # - Keybind: Ctrl+N | |
| # | |
| # Features: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| format: | |
| subject: '### %{subject}' | |
| line: '* [%{title}](%{url}) by @[%{user}](https://github.com/%{user}) %{status}' | |
| dictionary: | |
| status: | |
| merged: '**merged!**' | |
| closed: '**closed!**' |