Compare commits
10 Commits
Author | SHA1 | Date |
---|---|---|
Christoph J. Scherr | 0131eb3f8c | |
Christoph J. Scherr | b731c6e237 | |
Christoph J. Scherr | f461e4ac4d | |
Christoph J. Scherr | d5236bca30 | |
Christoph J. Scherr | 1342bbd614 | |
Christoph J. Scherr | e0575fce85 | |
Christoph J. Scherr | acd2a741b1 | |
Christoph J. Scherr | ab2faa658b | |
Christoph J. Scherr | b6a8077bc5 | |
Christoph J. Scherr | de57597120 |
|
@ -1 +1 @@
|
||||||
Subproject commit 9fed026ab76016f71df5dac7db9686c364b07c21
|
Subproject commit 69118b111d4cc6dc78edd64a5a724b6871cccff4
|
|
@ -0,0 +1,16 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
wips=$(git log --oneline --no-decorate | grep -i wip )
|
||||||
|
wips_n=$(echo "$wips" | wc -l)
|
||||||
|
LOCKFILE=/tmp/githook.allow_wip
|
||||||
|
|
||||||
|
if [[ ! -f $LOCKFILE && -n "$wips" ]]; then
|
||||||
|
# Allows us to read user input below, assigns stdin to keyboard
|
||||||
|
exec < /dev/tty
|
||||||
|
echo "contains $wips_n WIP commit(s)"
|
||||||
|
read -p "Really push? (Y/N) " -n 1 -r
|
||||||
|
case "$REPLY" in
|
||||||
|
y|Y ) echo -e "\ncontinuing..."; touch $LOCKFILE;;
|
||||||
|
* ) echo -e "\naborting."; exit 1;;
|
||||||
|
esac
|
||||||
|
fi
|
|
@ -6,6 +6,8 @@
|
||||||
!.zprofile
|
!.zprofile
|
||||||
!.vimrc
|
!.vimrc
|
||||||
!.ideavimrc
|
!.ideavimrc
|
||||||
|
!.githooks
|
||||||
|
!.githooks/**
|
||||||
!.config
|
!.config
|
||||||
!.config/nvim
|
!.config/nvim
|
||||||
!.config/nvim/**
|
!.config/nvim/**
|
||||||
|
|
42
.zshrc
42
.zshrc
|
@ -1,4 +1,6 @@
|
||||||
### ENVVARS
|
### ENVVARS
|
||||||
|
# zmodload zsh/zprof # for profiling, also uncomment last line
|
||||||
|
|
||||||
source "$HOME/.zprofile"
|
source "$HOME/.zprofile"
|
||||||
source "$HOME/.config/user-dirs.dirs"
|
source "$HOME/.config/user-dirs.dirs"
|
||||||
export TIMEFMT=$'\nreal\t%E\nuser\t%U\nsys\t%S\ncpu\t%P'
|
export TIMEFMT=$'\nreal\t%E\nuser\t%U\nsys\t%S\ncpu\t%P'
|
||||||
|
@ -31,6 +33,7 @@ alias isotime='date +"%Y-%m-%dT%H:%M:%S%z"'
|
||||||
alias isodate='date +%Y-%m-%dT%H:%M:%S%z'
|
alias isodate='date +%Y-%m-%dT%H:%M:%S%z'
|
||||||
alias datefmt='date $DATEFMT'
|
alias datefmt='date $DATEFMT'
|
||||||
alias gg=lazygit
|
alias gg=lazygit
|
||||||
|
alias sg=sourcegit
|
||||||
alias reload="source ~/.zshrc"
|
alias reload="source ~/.zshrc"
|
||||||
alias gls=/bin/ls
|
alias gls=/bin/ls
|
||||||
alias bat=batcat
|
alias bat=batcat
|
||||||
|
@ -42,6 +45,9 @@ alias psa="ps -eadf"
|
||||||
alias fsize="stat --printf='%s'"
|
alias fsize="stat --printf='%s'"
|
||||||
alias rg="rg --no-ignore"
|
alias rg="rg --no-ignore"
|
||||||
alias home="cd $HOME"
|
alias home="cd $HOME"
|
||||||
|
alias ff=firefox
|
||||||
|
alias fd=fdfind
|
||||||
|
# alias shutdown="confirm shutdown"
|
||||||
|
|
||||||
### Functions
|
### Functions
|
||||||
function largefiles () { exec 2>/dev/null; du -ah "$@" | grep -P "^\d+(G|T|P|E)\s" }
|
function largefiles () { exec 2>/dev/null; du -ah "$@" | grep -P "^\d+(G|T|P|E)\s" }
|
||||||
|
@ -92,6 +98,27 @@ else
|
||||||
fi
|
fi
|
||||||
return $ret
|
return $ret
|
||||||
}
|
}
|
||||||
|
function confirm() {
|
||||||
|
bash -c "
|
||||||
|
echo \"To be executed: $@\";
|
||||||
|
read -p \"Confirm (Y/N): \" -n 1 -r;
|
||||||
|
case \"\$REPLY\" in
|
||||||
|
y|Y ) echo \"es\"; eval $@;;
|
||||||
|
n|N ) echo \"o\";;
|
||||||
|
* ) echo -e \"\ninvalid\";;
|
||||||
|
esac" $@
|
||||||
|
}
|
||||||
|
function confirm-important() {
|
||||||
|
echo "Write 'yes do as i say' to confirm that you REALLY want to do this: $@"
|
||||||
|
read
|
||||||
|
if [[ "${REPLY,,}" = "yes do as i say" ]]
|
||||||
|
then
|
||||||
|
eval $@
|
||||||
|
else
|
||||||
|
echo "aborting"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
### ---- zsh options -------------------------------------
|
### ---- zsh options -------------------------------------
|
||||||
setopt autocd
|
setopt autocd
|
||||||
|
@ -210,6 +237,7 @@ fpath=($ZSH/plugins/zsh-completions/src $fpath)
|
||||||
|
|
||||||
ZAQ_PREFIXES+=('git commit( [^ ]##)# -[^ -]#m')
|
ZAQ_PREFIXES+=('git commit( [^ ]##)# -[^ -]#m')
|
||||||
ZAQ_PREFIXES_GREEDY+=('py #')
|
ZAQ_PREFIXES_GREEDY+=('py #')
|
||||||
|
ZAQ_PREFIXES_GREEDY+=('c #')
|
||||||
ZAQ_PREFIXES_GREEDY+=('countlines #')
|
ZAQ_PREFIXES_GREEDY+=('countlines #')
|
||||||
|
|
||||||
### --- fzf Config ------------------------------------
|
### --- fzf Config ------------------------------------
|
||||||
|
@ -259,3 +287,17 @@ eval "$(pyenv virtualenv-init - zsh)"
|
||||||
|
|
||||||
zstyle ':completion:*' menu select
|
zstyle ':completion:*' menu select
|
||||||
fpath+=~/.zfunc
|
fpath+=~/.zfunc
|
||||||
|
|
||||||
|
export NVM_DIR="$HOME/.config/nvm"
|
||||||
|
# diese Scheiße läd so ewig, wer auch immer dachte dass das so eine gute idee
|
||||||
|
# ist gehört gefeuert. Das muss jeden Tag viele leute minuten kosten.
|
||||||
|
# [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
|
||||||
|
# [ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion
|
||||||
|
|
||||||
|
# on demand nvm
|
||||||
|
function load_nvm() {
|
||||||
|
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
|
||||||
|
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion
|
||||||
|
}
|
||||||
|
alias nvim="load_nvm && nvim"
|
||||||
|
# zprof
|
||||||
|
|
Loading…
Reference in New Issue