Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions home/dot_config/sheldon/plugins.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ defer = "{{ hooks?.pre | nl }}{% for file in files %}zsh-defer source \"{{ file
# <https://github.com/olets/zsh-abbr>
[plugins.zsh-abbr]
github = "olets/zsh-abbr"
apply = ["defer"]

[plugins.zsh-abbr.hooks]
pre = '''
Expand All @@ -43,6 +44,7 @@ github = "zdharma-continuum/fast-syntax-highlighting"
# <https://github.com/5A6F65/fast-abbr-highlighting>
[plugins.fast-abbr-highlighting]
github = "5A6F65/fast-abbr-highlighting"
apply = ["defer"]

# <https://github.com/zsh-users/zsh-completions>
[plugins.zsh-completions]
Expand Down
8 changes: 0 additions & 8 deletions home/dot_config/zellij/config.kdl
Original file line number Diff line number Diff line change
@@ -1,9 +1 @@
theme "solarized-dark"

keybinds {
normal {
bind "Alt b" {
Run "bash" "-c" "$HOME/scripts/zellij-new-branch-tab.sh";
}
}
}
4 changes: 2 additions & 2 deletions home/dot_zsh.d/dev-tools.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export PROTO_AUTO_INSTALL=true
export PATH="$PROTO_HOME/tools/node/globals/bin:$PATH"

# Docker Desktop
source "$HOME/.docker/init-zsh.sh" || true
[ -r "$HOME/.docker/init-zsh.sh" ] && source "$HOME/.docker/init-zsh.sh"

# ni - package manager
export NI_DEFAULT_AGENT="pnpm"
Expand All @@ -16,4 +16,4 @@ export VISUAL="cursor"
export EDITOR="hx"

# Lazygit
export LG_CONFIG_FILE="$HOME/.config/lazygit/config.yml"
export LG_CONFIG_FILE="$HOME/.config/lazygit/config.yml"
5 changes: 4 additions & 1 deletion home/dot_zsh.d/fzf.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,10 @@ function fzf-cd-widget() {
)

if [[ -n "$selected" ]]; then
cd "$selected"
cd "$selected" || {
zle reset-prompt
return
}
fi
zle reset-prompt
}
Expand Down
17 changes: 0 additions & 17 deletions home/dot_zsh.d/utils.zsh
Original file line number Diff line number Diff line change
@@ -1,20 +1,3 @@
# Git worktree runner -- <https://github.com/coderabbitai/git-worktree-runner>
gwn() {
local branch_name="$1"
if [ -z "$branch_name" ]; then
echo "Usage: gwn <branch-name>"
return 1
fi
local default_branch
default_branch=$(git remote show origin 2>/dev/null | awk '/HEAD branch/ {print $NF}')
if [ -z "$default_branch" ] && command -v gh >/dev/null 2>&1; then
if default_branch=$(gh repo view --json defaultBranchRef --jq .defaultBranchRef.name 2>/dev/null); then
:
fi
fi
git gtr new "$branch_name" --from "origin/$default_branch" && cd "$(git gtr go "$branch_name")"
}

# 長時間コマンドの完了通知
notify-after() {
"$@"
Expand Down
9 changes: 4 additions & 5 deletions home/dot_zshrc
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,15 @@ ZSH_CONFIG_DIR="${HOME}/.zsh.d"
# 各設定ファイルを読み込み
source "${ZSH_CONFIG_DIR}/path.zsh"

# 補完システムの初期化(compdef を使うsourceより前に実行)
fpath+=(${ZSH_CONFIG_DIR}/completions)
autoload -Uz compinit && compinit
# 補完関数の探索先。実際の compinit は sheldon 側で 1 回だけ実行する。
fpath+=("${ZSH_CONFIG_DIR}/completions")
# `git gtr` を git サブコマンド補完に出すための zstyle だけ先に登録する。
zstyle ':completion:*:*:git:*' user-commands gtr:'Git worktree management'

source "${ZSH_CONFIG_DIR}/dev-tools.zsh"
source "${ZSH_CONFIG_DIR}/fzf.zsh"
[ -f "${ZSH_CONFIG_DIR}/.local.zsh" ] && source "${ZSH_CONFIG_DIR}/.local.zsh"

source "${ZSH_CONFIG_DIR}/completions/_git-gtr"

# Sheldon
eval "$(sheldon source)"

Expand Down
15 changes: 0 additions & 15 deletions home/scripts/executable_zellij-new-branch-tab.sh

This file was deleted.