diff --git a/git/.gitconfig b/git/.gitconfig index 04bc2c7..ee76f28 100644 --- a/git/.gitconfig +++ b/git/.gitconfig @@ -3,3 +3,8 @@ [user] name = Tri Vo Khac email = 33442340+vokhactri@users.noreply.github.com +[filter "lfs"] + required = true + clean = git-lfs clean -- %f + smudge = git-lfs smudge -- %f + process = git-lfs filter-process diff --git a/zsh/.config/zsh/.zshrc b/zsh/.config/zsh/.zshrc index 923e77c..13b6ccf 100644 --- a/zsh/.config/zsh/.zshrc +++ b/zsh/.config/zsh/.zshrc @@ -7,7 +7,7 @@ zinit wait lucid light-mode for \ hlissner/zsh-autopair \ Aloxaf/fzf-tab \ atinit"zicompinit; zicdreplay -q" \ - zdharma-continuum/fast-syntax-highlighting zap-zsh/supercharge \ + zdharma-continuum/fast-syntax-highlighting \ atload"_zsh_autosuggest_start" \ zsh-users/zsh-autosuggestions \ blockf atpull'zinit creinstall -q .' \ @@ -21,9 +21,9 @@ zinit light starship/starship # load binaries zinit as"command" wait lucid light-mode from"gh-r" for \ - extract"!" atload="alias cat=bat" lsd-rs/lsd \ - extract"!" atload="alias nano=micro" zyedidia/micro \ - extract"!" cp"autocomplete/bat.zsh -> _bat" atload"alias cat=bat" @sharkdp/bat \ + extract"!" lsd-rs/lsd \ + extract"!" zyedidia/micro \ + extract"!" cp"autocomplete/bat.zsh -> _bat" @sharkdp/bat \ extract"!" atclone="cp usr/bin/fastfetch .; rm -rf usr" \ fastfetch-cli/fastfetch \ atclone"./zoxide init zsh > init.zsh" atpull"%atclone" src"init.zsh" \ @@ -32,7 +32,7 @@ zinit as"command" wait lucid light-mode from"gh-r" for \ junegunn/fzf \ atclone"./fnm env --use-on-cd > init.zsh" atpull"%atclone" src"init.zsh" Schniz/fnm -# load local snippets +# load local scripts source $ZDOTDIR/exports.zsh - -zstyle ':fzf-tab:complete:cd:*' fzf-preview 'lsd -1 --color=always --icon=always $realpath' +source $ZDOTDIR/aliases.zsh +source $ZDOTDIR/options.zsh diff --git a/zsh/.config/zsh/aliases.zsh b/zsh/.config/zsh/aliases.zsh index ff1b6b6..e149715 100644 --- a/zsh/.config/zsh/aliases.zsh +++ b/zsh/.config/zsh/aliases.zsh @@ -1,4 +1,4 @@ #!/usr/bin/env zsh -(($+commands[bat])) && alias cat="bat" -(($+commands[lsd])) && alias ls="lsd" +alias cat="bat" +alias ls="lsd" diff --git a/zsh/.config/zsh/exports.zsh b/zsh/.config/zsh/exports.zsh index 1a3994f..347c61e 100644 --- a/zsh/.config/zsh/exports.zsh +++ b/zsh/.config/zsh/exports.zsh @@ -6,7 +6,7 @@ SAVEHIST=1000000 export MANWIDTH=999 export EDITOR="micro" -export PAGE="bat" +export PAGER="bat" export VISUAL="micro" export SUDO_EDITOR="micro" diff --git a/zsh/.config/zsh/options.zsh b/zsh/.config/zsh/options.zsh new file mode 100644 index 0000000..3bb969f --- /dev/null +++ b/zsh/.config/zsh/options.zsh @@ -0,0 +1,27 @@ +unsetopt BEEP +setopt AUTO_CD +setopt GLOB_DOTS +setopt NOMATCH +setopt MENU_COMPLETE +setopt EXTENDED_GLOB +setopt INTERACTIVE_COMMENTS +setopt APPEND_HISTORY + +HISTFILE="${ZDOTDIR:-$HOME}/.zsh_history" +HISTSIZE=5000000 +SAVEHIST=5000000 +HIST_STAMPS="dd.mm.yyyy" +setopt BANG_HIST # Treat the '!' character specially during expansion. +setopt EXTENDED_HISTORY # Write the history file in the ":start:elapsed;command" format. +setopt INC_APPEND_HISTORY # Write to the history file immediately, not when the shell exits. +setopt SHARE_HISTORY # Share history between all sessions. +setopt HIST_EXPIRE_DUPS_FIRST # Expire duplicate entries first when trimming history. +setopt HIST_IGNORE_DUPS # Don't record an entry that was just recorded again. +setopt HIST_IGNORE_ALL_DUPS # Delete old recorded entry if new entry is a duplicate. +setopt HIST_FIND_NO_DUPS # Do not display a line previously found. +setopt HIST_IGNORE_SPACE # Don't record an entry starting with a space. +setopt HIST_SAVE_NO_DUPS # Don't write duplicate entries in the history file. +setopt HIST_REDUCE_BLANKS # Remove superfluous blanks before recording entry. +setopt HIST_VERIFY # Don't execute immediately upon history expansion. + +zstyle ':fzf-tab:complete:cd:*' fzf-preview 'lsd -1 --color=always --icon=always $realpath'