This commit is contained in:
Tobias Manske 2023-11-27 23:32:20 +01:00
parent 82cf324652
commit 67a44a5ff8
Signed by: tobias
GPG Key ID: 9164B527694A0709

View File

@ -1,3 +1,4 @@
# zmodload zsh/zprof
# Start configuration added by Zim install {{{ # Start configuration added by Zim install {{{
# #
# User configuration sourced by interactive shells # User configuration sourced by interactive shells
@ -32,6 +33,8 @@ WORDCHARS=${WORDCHARS//[\/]}
export ZIM_HOME=$HOME/.zim export ZIM_HOME=$HOME/.zim
export MPD_HOST=fsi-hase.fsmi.uni-karlsruhe.de
# -------------------- # --------------------
# Module configuration # Module configuration
@ -127,14 +130,15 @@ autoload compinit; compinit
autoload -U +X bashcompinit && bashcompinit autoload -U +X bashcompinit && bashcompinit
export FZF_DEFAULT_COMMAND='fd --type f' 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 source /usr/share/fzf/key-bindings.zsh
alias pdfdiff="diffpdf" alias pdfdiff="diffpdf"
alias cb="xclip -sel clipboard" alias cb="xclip -sel clipboard"
alias vi="nvim" alias vi="nvim"
alias vim="nvim" alias vim="nvim"
alias ls="exa" alias ls="eza"
alias lln="eza -l -snew --time-style relative"
# GPG for SSH # GPG for SSH
export GPG_TTY="$(tty)" export GPG_TTY="$(tty)"
@ -212,3 +216,28 @@ function calc() {
fi fi
printf "\n" 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