Skip to content

Commit

Permalink
[zsh] Make pasting of URLs work with download_ functions
Browse files Browse the repository at this point in the history
Pasting a URL now properly escapes them automatically so we don't need
to prefix with `noglob`

    download_video https://www.youtube.com/watch?v=dQw4w9WgXcQ
  • Loading branch information
pangratz committed Apr 13, 2023
1 parent ccb3cc2 commit cc50442
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions zsh/config.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@ autoload -U $DOTFILES/functions/*(:t)
# prevent "Fatal error: EMFILE: Too many opened files." error message
ulimit -n 10000

# prevent "no matches found" when url is pasted
# https://superuser.com/a/1237124/128931
autoload -Uz bracketed-paste-magic
zle -N bracketed-paste bracketed-paste-magic
autoload -Uz url-quote-magic
zle -N self-insert url-quote-magic

HISTFILE=~/.zsh_history
HISTSIZE=10000
Expand Down

0 comments on commit cc50442

Please sign in to comment.