This commit is contained in:
afiqzudinhadi 2024-09-17 09:23:18 +08:00 committed by GitHub
commit 470bc93cfe
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

31
.zshrc Normal file
View file

@ -0,0 +1,31 @@
ZSH_THEME="powerlevel10k/powerlevel10k"
HIST_STAMPS="yyyy-mm-dd"
plugins=(aliases fzf fzf-tab git history web-search you-should-use zsh-autosuggestions)
export HISTTIMEFORMAT="%F %T "
# Preview file content using bat (https://github.com/sharkdp/bat)
export FZF_CTRL_T_OPTS="
--walker-skip .git,node_modules,target,vendor
--preview 'bat -n --color=always {}'
--bind 'ctrl-/:change-preview-window(down|hidden|)'"
# CTRL-/ to toggle small preview window to see the full command
# CTRL-Y to copy the command into clipboard using pbcopy
export FZF_CTRL_R_OPTS="
--preview 'echo {}' --preview-window up:3:hidden:wrap
--bind 'ctrl-/:toggle-preview'
--bind 'ctrl-y:execute-silent(echo -n {2..} | pbcopy)+abort'
--color header:italic
--header 'Press CTRL-Y to copy command into clipboard'"
# Print tree structure in the preview window
export FZF_ALT_C_OPTS="
--walker-skip .git,node_modules,target,vendor
--preview 'tree -C {}'"
alias lzd='lazydocker'
eval $(thefuck --alias)