export ZSH="$HOME/.oh-my-zsh" ZSH_THEME="robbyrussell" ZSH_TMUX_AUTOSTART=false # Which plugins would you like to load? # Standard plugins can be found in $ZSH/plugins/ # Custom plugins may be added to $ZSH_CUSTOM/plugins/ # Example format: plugins=(rails git textmate ruby lighthouse) # Add wisely, as too many plugins slow down shell startup. plugins=(git fzf) source $ZSH/oh-my-zsh.sh if [ -d "$HOME/.local/bin" ] ; then PATH="$HOME/.local/bin:$PATH" fi source ~/.zshalias #Commands #copy to clipboard alias cl='(){bat $1 | xclip -sel clip ;}' #FZF # Preview file content using bat (https://github.com/sharkdp/bat) export FZF_CTRL_T_OPTS=" --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="--preview 'tree -C {}'"