zshrc fzf history and ps1
This commit is contained in:
parent
cc54ff0749
commit
33f82903e4
34
zsh/.zshrc
34
zsh/.zshrc
|
@ -1,15 +1,5 @@
|
||||||
# Enable Powerlevel10k instant prompt. Should stay close to the top of ~/.zshrc.
|
# prompt
|
||||||
# Initialization code that may require console input (password prompts, [y/n]
|
export PS1="%{%F{226}%}%n%{%F{220}%}@%{%F{214}%}%m %{%F{33}%}%1~ %{%f%}$ "
|
||||||
# confirmations, etc.) must go above this block; everything else may go below.
|
|
||||||
if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then
|
|
||||||
source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# import keys
|
|
||||||
if [ -f ~/.keys ]; then
|
|
||||||
. ~/.keys
|
|
||||||
echo "keys loaded"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# aliases
|
# aliases
|
||||||
# alias python="/Library/Frameworks/Python.framework/Versions/3.10/bin/python3"
|
# alias python="/Library/Frameworks/Python.framework/Versions/3.10/bin/python3"
|
||||||
|
@ -52,12 +42,6 @@ compinit
|
||||||
_comp_options+=(globdots)
|
_comp_options+=(globdots)
|
||||||
zstyle ':completion:*' menu select
|
zstyle ':completion:*' menu select
|
||||||
|
|
||||||
# start power theme
|
|
||||||
source ~/powerlevel10k/powerlevel10k.zsh-theme
|
|
||||||
|
|
||||||
# To customize prompt, run `p10k configure` or edit ~/.p10k.zsh.
|
|
||||||
[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh
|
|
||||||
|
|
||||||
# auto cd
|
# auto cd
|
||||||
setopt auto_cd
|
setopt auto_cd
|
||||||
|
|
||||||
|
@ -71,4 +55,16 @@ eval "$(pyenv init --path)"
|
||||||
eval "$(pyenv init -)"
|
eval "$(pyenv init -)"
|
||||||
# eval "$(pyenv virtualenv-init -)"
|
# eval "$(pyenv virtualenv-init -)"
|
||||||
|
|
||||||
source ~/powerlevel10k/powerlevel10k.zsh-theme
|
|
||||||
|
# fzf
|
||||||
|
export FZF_DEFAULT_OPTS='--layout=reverse --height=50% --preview-window=right:50%:border-sharp --border-label=" command preview " --border=double'
|
||||||
|
|
||||||
|
# Set up fzf key bindings and fuzzy completion
|
||||||
|
# Ctrl+R override for bash history
|
||||||
|
# Alt-C overried to cd into selected directory
|
||||||
|
eval "$(fzf --zsh)"
|
||||||
|
|
||||||
|
# Quick file finder with preview and open with vim (Ctrl+T override)
|
||||||
|
# bind '"\C-t": "fzf --preview \"cat {}\" < <(find . -type f) | xargs $EDITOR\n"'
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue