Skip to content

Commit

Permalink
add faster command-line pasting with autosuggest
Browse files Browse the repository at this point in the history
  • Loading branch information
LucasLarson committed Jan 31, 2021
1 parent d865e2c commit 862a0c8
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions .oh-my-zsh/custom/aliases.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,17 @@
# aliases.zsh
# for all active aliases, run `alias`

# paste faster
# https://git.io/pasteinit-pastefinish
pasteinit() {
OLD_SELF_INSERT=${${(s.:.)widgets[self-insert]}[2,3]}
zle -N self-insert 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

# Atom
# https://github.com/jeefberkey/dotfiles/blob/2ded1c3/.zshrc#L48-L61
Expand Down

0 comments on commit 862a0c8

Please sign in to comment.