adding more predefined patterns

This commit is contained in:
Jorge Morante 2016-05-01 19:54:20 +02:00
parent fb07f89064
commit 5210e64836
2 changed files with 7 additions and 3 deletions

View File

@ -12,7 +12,9 @@ Relevant stuff:
* File paths
* git SHAs
* numbers with 4+ digits
* numbers ( 4+ digits )
* urls
* ip addresses
It also works on copy mode, but requires *tmux 2.2* or newer to properly take
the scroll position into account.
@ -67,7 +69,7 @@ set -g @fingers-pattern-1 'yolo'
.
.
.
set -g @fingers-pattern-50 'whatever.*'
set -g @fingers-pattern-50 'whatever'
```
NOTE: patterns are case insensitive, and grep's extended syntax should be used.

View File

@ -16,8 +16,10 @@ source "$CURRENT_DIR/utils.sh"
PATTERNS_LIST=(
"((^|^\.|[[:space:]]|[[:space:]]\.|[[:space:]]\.\.|^\.\.)[[:alnum:]~_-]*/[][[:alnum:]_.#$%&+=/@-]*)"
"([[:digit:]]{5,})"
"([[:digit:]]{4,})"
"([0-9a-f]{7}|[0-9a-f]{40})"
"(https?://|git@|git://|ssh://|ftp://|file:///)[[:alnum:]?=%/_.:,;~@!#$&()*+-]*"
"[[:digit:]]{1,3}\.[[:digit:]]{1,3}\.[[:digit:]]{1,3}\.[[:digit:]]{1,3}"
)
IFS=$'\n'