tmux: Don't match math like 3.14 or 2/3.14 as pathnames
dblume

dblume commited on 2025-11-28 00:19:03
Showing 1 changed files, with 1 additions and 1 deletions.

... ...
@@ -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:]_\.#$%&+=@-]+)?\.[[:alnum:]]{1,4}|([[: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:]_\.#$%&+=@-]*[[:alpha:]][[:alnum:]_\.#$%&+=@-]*|~|\.|\.\.)(/[[:alnum:]_\.#$%&+=@-]+)?\.[[:alnum:]]{1,4}|([[: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