Skip to content

Commit

Permalink
Switch to my fork of urlview that uses pcre
Browse files Browse the repository at this point in the history
  • Loading branch information
keith committed Feb 4, 2016
1 parent d73ee87 commit cdc9bdb
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
1 change: 1 addition & 0 deletions osx/Brewfile
Expand Up @@ -23,6 +23,7 @@ brew 'httpie'
brew 'ideviceinstaller'
brew 'jq'
brew 'keith/formulae/brew-cask', args: ['HEAD']
brew 'keith/formulae/urlview', args: ['HEAD']
brew 'less'
brew 'msmtp'
brew 'mu'
Expand Down
11 changes: 10 additions & 1 deletion urlview
Expand Up @@ -6,5 +6,14 @@ COMMAND ~/.mutt/urlhandler.sh %s
# Match those same characters in parens
# Match those characters afterwards
# Exclude some characters from the end
REGEXP (https?:///?|www.)[a-zA-Z0-9.-]+[:+\!$;=%&?#a-zA-Z0-9/._-]+(\([:+\!$;=%&?#a-zA-Z0-9/._-]+\)|[:+\!$;=%&?#a-zA-Z0-9/._-]+)[:+\!$;=%&?#a-zA-Z0-9/_-]+

# Non pcre regex
# REGEXP (https?:///?|www.)[a-zA-Z0-9.-]+[:+\!$;=%&?#a-zA-Z0-9/._-]+(\([:+\!$;=%&?#a-zA-Z0-9/._-]+\)|[:+\!$;=%&?#a-zA-Z0-9/._-]+)[:+\!$;=%&?#a-zA-Z0-9/_-]+

# Daring fireball regex
REGEXP (?i)\b((?:[a-z][\w-]+:(?:/{1,3}|[a-z0-9%])|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}/)(?:[^\s()<>]+|\(([^\s()<>]+|(\([^\s()<>]+\)))*\))+(?:\(([^\s()<>]+|(\([^\s()<>]+\)))*\)|[^\s`!()\[\]{};:'".,<>?«»“”‘’]))

# Quit after opening a URL
QUITONLAUNCH

# vim:tw=0

0 comments on commit cdc9bdb

Please sign in to comment.