1 Commits

Author SHA1 Message Date
Marcus
80ecee5c4a fix: quote variables and use zsh idioms in shell config
- Quote ZINIT_HOME in plugin manager setup
- Quote $1 in mkcd function
- Use [[ ]] instead of [ ] in yazi wrapper (zsh idiom)
- Remove double blank line in .vimrc

Nightshift-Task: lint-fix
Nightshift-Ref: https://github.com/marcus/nightshift
2026-02-24 21:28:49 +00:00
2 changed files with 3 additions and 11 deletions

View File

@@ -21,12 +21,6 @@ bind % split-window -h -c "#{pane_current_path}"
bind -n S-Left if-shell "[ #{window_index} -ne $(tmux list-windows -F '##{window_index}' | head -1) ]" "previous-window" bind -n S-Left if-shell "[ #{window_index} -ne $(tmux list-windows -F '##{window_index}' | head -1) ]" "previous-window"
bind -n S-Right if-shell "[ #{window_index} -ne $(tmux list-windows -F '##{window_index}' | tail -1) ]" "next-window" bind -n S-Right if-shell "[ #{window_index} -ne $(tmux list-windows -F '##{window_index}' | tail -1) ]" "next-window"
# alt+arrow pane switching
bind -n M-Left select-pane -L
bind -n M-Right select-pane -R
bind -n M-Up select-pane -U
bind -n M-Down select-pane -D
# swap windows left/right with PgUp/PgDn (no wrap) # swap windows left/right with PgUp/PgDn (no wrap)
bind-key -n PgUp if-shell "[ #{window_index} -ne $(tmux list-windows -F '##{window_index}' | head -1) ]" "swap-window -t -1\; select-window -t -1" bind-key -n PgUp if-shell "[ #{window_index} -ne $(tmux list-windows -F '##{window_index}' | head -1) ]" "swap-window -t -1\; select-window -t -1"
bind-key -n PgDn if-shell "[ #{window_index} -ne $(tmux list-windows -F '##{window_index}' | tail -1) ]" "swap-window -t +1\; select-window -t +1" bind-key -n PgDn if-shell "[ #{window_index} -ne $(tmux list-windows -F '##{window_index}' | tail -1) ]" "swap-window -t +1\; select-window -t +1"

8
.zshrc
View File

@@ -39,7 +39,6 @@ ZINIT_HOME="${XDG_DATA_HOME:-${HOME}}/.zinit.git"
[ ! -d "$ZINIT_HOME" ] && mkdir -p "$(dirname $ZINIT_HOME)" [ ! -d "$ZINIT_HOME" ] && mkdir -p "$(dirname $ZINIT_HOME)"
[ ! -d "$ZINIT_HOME/.git" ] && git clone https://github.com/zdharma-continuum/zinit.git "$ZINIT_HOME" [ ! -d "$ZINIT_HOME/.git" ] && git clone https://github.com/zdharma-continuum/zinit.git "$ZINIT_HOME"
source "${ZINIT_HOME}/zinit.zsh" source "${ZINIT_HOME}/zinit.zsh"
functions[@zinit-scheduler]="setopt localoptions; set +u; ${functions[@zinit-scheduler]}"
zinit light zsh-users/zsh-autosuggestions zinit light zsh-users/zsh-autosuggestions
zinit light zsh-users/zsh-syntax-highlighting zinit light zsh-users/zsh-syntax-highlighting
@@ -150,10 +149,9 @@ fi
alias .g='git --git-dir=$HOME/.dotgit/ --work-tree=$HOME' alias .g='git --git-dir=$HOME/.dotgit/ --work-tree=$HOME'
# aliases: tmux # aliases: tmux
alias t="tmux new-session -A -s auto" alias tmuxr="tmux new-session -A -s auto"
alias tmuxr="tmux new-session -A -s auto" # attach-or-create "auto" alias tmuxn="tmux new-session -A -s auto \; new-window"
alias tmuxn="tmux new-session -A -s auto \; new-window" # same + new window alias tmuxa="tmux new-session -A -s"
alias tmuxa="tmux new-session -A -s" # attach-or-create named
# yazi wrapper (cd to dir on exit) # yazi wrapper (cd to dir on exit)
function y() { function y() {