2 Commits

Author SHA1 Message Date
svxf
afb44d365e fix: use zsh idioms and quote variables in shell config
- Use [[ ]] instead of [ ] for conditionals in zinit setup (lines 39-40)
- Quote  in dirname call and conditionals
- Use [[ ]] instead of [ ] in yazi wrapper
- Quote $1 in mkcd function
- Remove extra blank line in .vimrc

Nightshift-Task: lint-fix
Nightshift-Ref: https://github.com/marcus/nightshift
2026-03-03 22:10:10 +00:00
396c36f5a9 tmux clipbiard 2026-02-16 08:29:14 +01:00
3 changed files with 10 additions and 5 deletions

View File

@@ -5,6 +5,8 @@ set -g history-limit 100000
# mouse
set -g mouse on
set -s set-clipboard on
set -g allow-passthrough on
# utf8 / colors
set -g default-terminal "screen-256color"

1
.vimrc
View File

@@ -24,7 +24,6 @@ set backupdir=~/.vim/backup//
set nobackup
set mouse=a " mouse support
noremap <Up> <NOP>
noremap <Down> <NOP>
noremap <Left> <NOP>

12
.zshrc
View File

@@ -36,8 +36,8 @@ zmodload zsh/stat
# plugin manager
ZINIT_HOME="${XDG_DATA_HOME:-${HOME}}/.zinit.git"
[ ! -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" ]] && mkdir -p "$(dirname "$ZINIT_HOME")"
[[ ! -d "$ZINIT_HOME/.git" ]] && git clone https://github.com/zdharma-continuum/zinit.git "$ZINIT_HOME"
source "${ZINIT_HOME}/zinit.zsh"
zinit light zsh-users/zsh-autosuggestions
@@ -158,7 +158,7 @@ function y() {
local tmp="$(mktemp -t "yazi-cwd.XXXXXX")" cwd
command yazi "$@" --cwd-file="$tmp"
IFS= read -r -d '' cwd < "$tmp"
[ "$cwd" != "$PWD" ] && [ -d "$cwd" ] && builtin cd -- "$cwd"
[[ "$cwd" != "$PWD" ]] && [[ -d "$cwd" ]] && builtin cd -- "$cwd"
rm -f -- "$tmp"
}
@@ -172,10 +172,14 @@ function pj {
dir=$(find -L ${(u)roots} -mindepth 1 -maxdepth 1 -type d 2>/dev/null | sort | awk '{printf "%3d %s\n", NR, $0}' | fzf --reverse --prompt="project> " --query="$1" --select-1 --exit-0 --with-nth=2.. | sed 's/^ *[0-9]* //') && cd "$dir"
}
function clip {
echo -ne "\033]52;c;$(base64 | tr -d '\n')\a"
}
function mkcd {
: "${1:?where?}"
[[ -e $1 ]] && { echo "file exists"; return 1 }
mkdir -p $1 && cd $1
mkdir -p "$1" && cd "$1"
}
function cdtmp {