Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- export ZSH="/home/maykel/.oh-my-zsh"
- ZSH_THEME="robbyrussell"
- plugins=(
- git
- history-substring-search
- colored-man-pages
- zsh-autosuggestions
- zsh-syntax-highlighting
- )
- source $ZSH/oh-my-zsh.sh
- # User configuration
- export PWGEN_SPECIAL="\'\"\@\?\^\&\*\(\)\`\:\~\?\;\:\[\]\{\}\.\,\\\/\|\#"
- function pwgen-special () {
- NUM_CHARS=$1
- pwgen -sy $NUM_CHARS 1 -r $PWGEN_SPECIAL
- }
- export PATH=/home/maykel/bin:$PATH
- ## AUTOCOMPLETE SSH HOSTS ##
- h=()
- if [[ -r ~/.ssh/config ]]; then
- h=($h ${${${(@M)${(f)"$(cat ~/.ssh/config)"}:#Host *}#Host }:#*[*?]*})
- fi
- if [[ -r ~/.ssh/known_hosts ]]; then
- h=($h ${${${(f)"$(cat ~/.ssh/known_hosts{,2} || true)"}%%\ *}%%,*}) 2>/dev/null
- fi
- if [[ $#h -gt 0 ]]; then
- zstyle ':completion:*:ssh:*' hosts $h
- zstyle ':completion:*:slogin:*' hosts $h
- fi
- ## This speeds up pasting w/ autosuggest ##
- # 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
- function netstat-count () {
- netstat -tn 2>/dev/null | grep :443 | awk '{print $5}' | cut -d: -f1 | sort | uniq -c | sort -nr | head
- }
- #[ "$TERM" = "xterm-kitty" ] && alias ssh="kitty +kitten ssh"
- #source ~/powerlevel10k/powerlevel10k.zsh-theme
- # To customize prompt, run `p10k configure` or edit ~/.p10k.zsh.
- #[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh
- [ -f ~/.fzf.zsh ] && source ~/.fzf.zsh
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement