Skip to content

Search for nrepl urls too #125

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion copycat.tmux
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ set_default_stored_searches() {
local ip_search="$(get_tmux_option "$copycat_ip_search_option" "$default_ip_search_key")"

if stored_search_not_defined "$url_search"; then
tmux set-option -g "${COPYCAT_VAR_PREFIX}_${url_search}" "(https?://|git@|git://|ssh://|ftp://|file:///)[[:alnum:]?=%/_.:,;~@!#$&()*+-]*"
tmux set-option -g "${COPYCAT_VAR_PREFIX}_${url_search}" "(https?://|git@|git://|ssh://|ftp://|file:///|nrepl://)[[:alnum:]?=%/_.:,;~@!#$&()*+-]*"
fi
if stored_search_not_defined "$file_search"; then
tmux set-option -g "${COPYCAT_VAR_PREFIX}_${file_search}" "(^|^\.|[[:space:]]|[[:space:]]\.|[[:space:]]\.\.|^\.\.)[[:alnum:]~_-]*/[][[:alnum:]_.#$%&+=/@-]*"
Expand Down
4 changes: 4 additions & 0 deletions test/test_url_search.exp
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,10 @@ display_text "file:///foo/bar/file.txt"
tmux_ctrl_u
assert_highlighted "file:///foo/bar/file.txt" "middle of the pane, file url"

display_text "nrepl://127.0.0.1:40252"
tmux_ctrl_u
assert_highlighted "nrepl://127.0.0.1:40252" "middle of the pane, nrepl url"

# urls with parameters
#---------------------
new_tmux_pane
Expand Down