zsh
This commit is contained in:
parent
82cf324652
commit
67a44a5ff8
33
zsh/.zshrc
33
zsh/.zshrc
@ -1,3 +1,4 @@
|
||||
# zmodload zsh/zprof
|
||||
# Start configuration added by Zim install {{{
|
||||
#
|
||||
# User configuration sourced by interactive shells
|
||||
@ -32,6 +33,8 @@ WORDCHARS=${WORDCHARS//[\/]}
|
||||
|
||||
export ZIM_HOME=$HOME/.zim
|
||||
|
||||
export MPD_HOST=fsi-hase.fsmi.uni-karlsruhe.de
|
||||
|
||||
|
||||
# --------------------
|
||||
# Module configuration
|
||||
@ -127,14 +130,15 @@ autoload compinit; compinit
|
||||
autoload -U +X bashcompinit && bashcompinit
|
||||
|
||||
export FZF_DEFAULT_COMMAND='fd --type f'
|
||||
source /usr/share/fzf/completion.zsh
|
||||
source /usr/share/fzf-tab-completion/zsh/fzf-zsh-completion.sh
|
||||
source /usr/share/fzf/key-bindings.zsh
|
||||
|
||||
alias pdfdiff="diffpdf"
|
||||
alias cb="xclip -sel clipboard"
|
||||
alias vi="nvim"
|
||||
alias vim="nvim"
|
||||
alias ls="exa"
|
||||
alias ls="eza"
|
||||
alias lln="eza -l -snew --time-style relative"
|
||||
|
||||
# GPG for SSH
|
||||
export GPG_TTY="$(tty)"
|
||||
@ -212,3 +216,28 @@ function calc() {
|
||||
fi
|
||||
printf "\n"
|
||||
}
|
||||
|
||||
bindkey "^[[H" beginning-of-line # wtf why is this suddenly broken?
|
||||
|
||||
function ghcd() {
|
||||
if [[ -d "/tmp/github/$@" ]]; then
|
||||
pushd "/tmp/github/$@"
|
||||
return
|
||||
fi
|
||||
|
||||
local repo=$(gh search repos "$@" | fzf --exit-0 | cut -f1)
|
||||
local repo_path="/tmp/github/${repo:t}"
|
||||
|
||||
[[ -z "$repo" ]] && return 1
|
||||
[[ ! -d /tmp/github ]] && mkdir /tmp/github
|
||||
|
||||
if [[ -d "$repo_path" ]]; then
|
||||
pushd "$repo_path"
|
||||
return
|
||||
fi
|
||||
|
||||
gh repo clone "$repo" "$repo_path" \
|
||||
&& pushd "$repo_path"
|
||||
}
|
||||
# zprof
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user