initial commit

This commit is contained in:
gin
2026-05-13 14:17:03 +08:00
commit b17dec8e44
10 changed files with 169 additions and 0 deletions
+3
View File
@@ -0,0 +1,3 @@
alias ls="ls --color=auto"
alias ll="ls -l"
alias grep="grep --color=auto"
+15
View File
@@ -0,0 +1,15 @@
export FZF_DEFAULT_OPTS=" \
--height 40% \
--style full \
--layout reverse \
--preview 'tree -C {} | head -160'
"
# select directory by default
export FZF_DEFAULT_COMMAND="
fd -a --type f --type d --hidden --follow --exclude .git --exclude node_modules --base-directory $HOME
"
export FZF_CTRL_T_OPTS="--preview '(highlight -O ansi -l {} 2> /dev/null || bat --color=always {} || tree -C {}) 2> /dev/null | head -160'"
export FZF_ALT_C_OPTS="--preview 'tree -C {} | head -160'"
export FZF_CTRL_R_OPTS="--preview 'echo {}' --preview-window down:3:hidden:wrap --bind '?:toggle-preview'"
+9
View File
@@ -0,0 +1,9 @@
if [ -n "$BASH_VERSION" ]; then
export PS1='\[\e[38;5;147m\]\u\[\e[0m\]@\[\e[38;5;183m\]\h\[\e[0m\] \[\e[38;5;225m\]\w\[\e[0m\] \$ '
else
if [ "$UID" -eq 0 ]; then
export PROMPT="%F{147}%n%f@%F{183}%m%f %F{225}%~%f %# "
else
export PROMPT="%F{147}%n%f@%F{183}%m%f %F{225}%~%f \$ "
fi
fi
Symlink
+1
View File
@@ -0,0 +1 @@
/root/.config/zsh
+11
View File
@@ -0,0 +1,11 @@
bindkey -e
# setup for fzf
source ${0:A:h}/fzf.zsh
source <(fzf --zsh)
source ${0:A:h}/aliases.zsh
source ${0:A:h}/prompt.zsh
# set default editor
export EDITOR=vim