Created
September 19, 2019 10:23
-
-
Save YoloClin/ffd82f441d292ccc5f25c62a80c78ad0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
source ~/.bashrc | |
# Be careful with this, if you breakt it you won't be able to open terminals! | |
if [ "$(ps -ocommand= -p $PPID | awk '{print $1}')" != 'script' ] ; then | |
script -q -f $HOME/.shell_logs/$(date +"%d-%b-%y_%H-%M-%S")_shell.log && exit | |
fi ; | |
# Disable escaping of URLs and stuff (significant speed improvement) | |
DISABLE_MAGIC_FUNCTIONS=true | |
export ZSH=~/.oh-my-zsh | |
ZSH_THEME="powerlevel9k/powerlevel9k" | |
HYPHEN_INSENSITIVE="true" | |
DISABLE_AUTO_UPDATE="true" | |
COMPLETION_WAITING_DOTS="true" # red dots whilst waiting for completion. | |
fpath=(~/.zsh-completions/ $fpath) | |
plugins=( | |
colored-man-pages | |
colorize | |
command-not-found | |
cp | |
dirhistory | |
zsh-autosuggestions | |
zsh-syntax-highlighting | |
) | |
source $ZSH/oh-my-zsh.sh | |
alias grep="grep -n --exclude=\*~ --exclude=\#\* --exclude-dir=/root/.shell_logs --exclude-dir=/home/clin/.shell_logs --exclude-dir=~.shell_logs --color=auto " | |
alias ls='ls --hide="lost+found" --hide="#*" --hide="*~" --hide="*.pyc" --hide="*.egg-info" --hide="__pycache__" --color=auto' | |
ZSH_HIGHLIGHT_HIGHLIGHTERS=(main brackets pattern cursor) | |
source ~/.zshrc-theme | |
unsetopt share_history | |
# Fixes own+global writable files in ls | |
LS_COLORS="${LS_COLORS}ow=30;45:" | |
## Paste speedup | |
# https://github.com/zsh-users/zsh-autosuggestions/issues/238 | |
pasteinit() { | |
OLD_SELF_INSERT=${${(s.:.)widgets[self-insert]}[2,3]} | |
zle -N self-insert url-quote-magic # I wonder if you'd need `.url-quote-magic`? | |
} | |
pastefinish() { | |
zle -N self-insert $OLD_SELF_INSERT | |
} | |
zstyle :bracketed-paste-magic paste-init pasteinit | |
zstyle :bracketed-paste-magic paste-finish pastefinish |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I have a question about:
How could that break to not open terminals anymore?
Would you like to explain, why that could happen? Thank you!