diff options
| author | Anton Bobov <anton@bobov.name> | 2024-08-14 23:56:52 +0500 |
|---|---|---|
| committer | Anton Bobov <anton@bobov.name> | 2024-08-14 23:56:52 +0500 |
| commit | b29dc4e14756d755731f8cab8cb84a5b1e2c7d89 (patch) | |
| tree | c71d7728b4ac575acc0046d3109f68684d73a30f /files/.config | |
| parent | 0cde983819a823fd4d2df087a210380dca12cd70 (diff) | |
tmux: Update search bindings
Diffstat (limited to 'files/.config')
| -rwxr-xr-x | files/.config/tmux/scripts/search | 7 | ||||
| -rw-r--r-- | files/.config/tmux/tmux.conf | 5 |
2 files changed, 9 insertions, 3 deletions
diff --git a/files/.config/tmux/scripts/search b/files/.config/tmux/scripts/search index 027f789..53728b4 100755 --- a/files/.config/tmux/scripts/search +++ b/files/.config/tmux/scripts/search @@ -3,6 +3,8 @@ set -euo pipefail +urls='(https?://|git@|git://|ssh://|ftp://|file:///)[[:alnum:]?=%/_.:,;~@!#$&()*+-]*' + search() { tmux send-keys -X search-backward "$1" } @@ -18,8 +20,11 @@ search_path() { search "~?(/$path+|$path+/|$path*\.$path+)+$path*(:[0-9]+)*" } +search_url() { + search "$urls" +} + search_interesting() { - urls='(https?://|git@|git://|ssh://|ftp://|file:///)[[:alnum:]?=%/_.:,;~@!#$&()*+-]*' emails='[-_\.[:alnum:]]+@[-_\.[:alnum:]]+' hashes='\b(([0-9a-f]{7,40}|[[:alnum:]]{52}|[0-9a-f]{64})(\.{2,3})?)+\b' ips='[[:digit:]]{1,3}\.[[:digit:]]{1,3}\.[[:digit:]]{1,3}\.[[:digit:]]{1,3}' diff --git a/files/.config/tmux/tmux.conf b/files/.config/tmux/tmux.conf index 9ec8220..fc30009 100644 --- a/files/.config/tmux/tmux.conf +++ b/files/.config/tmux/tmux.conf @@ -61,8 +61,9 @@ set -g status-right "$USER@#h %H:%M" # Search search='~/.config/tmux/scripts/search' bind / run "$search" -bind -n C-F run "$search path" -bind -n C-G run "$search interesting" +bind C-F run "$search path" +bind C-U run "$search url" +bind C-G run "$search interesting" set -g @colors-solarized 'light' |
