tmux: Don't match paths whose lines or cols are bad.
dblume

dblume commited on 2025-11-20 21:47:51
Showing 1 changed files, with 1 additions and 1 deletions.


Sometimes GUID looking things matched because f.txt:30acd...
So now add (\>|$) at the end of the expression.
... ...
@@ -44,7 +44,7 @@ bind -n M-l select-pane -R
44 44
 # 3. Navigate selections with n/N.
45 45
 # 4. Once found, o to open the file in $EDITOR.
46 46
 bind-key f copy-mode \; send-keys -X search-backward \
47
-  '(^|\<|[[:space:]])(("([[:alnum:] _\.#$%&+=@-]+|~)?(/[[:alnum:] _\.#$%&+=@-]+)*"|([[:alnum:]_\.#$%&+=@-]+|~)?(/[[:alnum:]_\.#$%&+=@-]+)+|[[:alnum:]_\.#$%&+=@-]*[[:alpha:]][[:alnum:]_\.#$%&+=@-]*)(:[0-9]{1,10})|([[:alnum:]_\.#$%&+=@-]+|~)?(/[[:alnum:]_\.#$%&+=@-]+){2,}(:[0-9]{1,10})?)(:[0-9]{1,10})?'
47
+  '(^|[[:space:]])(("([[:alnum:] _\.#$%&+=@-]+|~)?(/[[:alnum:] _\.#$%&+=@-]+)*"|([[:alnum:]_\.#$%&+=@-]+|~)?(/[[:alnum:]_\.#$%&+=@-]+)+|[[:alnum:]_\.#$%&+=@-]*[[:alpha:]][[:alnum:]_\.#$%&+=@-]*)(:[0-9]{1,10})|([[:alnum:]_\.#$%&+=@-]+|~)?(/[[:alnum:]_\.#$%&+=@-]+){2,}(:[0-9]{1,10})?)(:[0-9]{1,10})?(\>|$)'
48 48
 
49 49
 # save the buffer, then open an editor in the current pane
50 50
 bind-key -T copy-mode-vi o send-keys -X copy-pipe-and-cancel \
51 51