From 4e8eb7c2ca6db92afd073e785dcd8314f289c7bd Mon Sep 17 00:00:00 2001 From: Wez Furlong Date: Sat, 13 Jul 2024 14:25:01 -0700 Subject: [PATCH] fix: quickselect now matches paths with // closes: https://github.com/wez/wezterm/issues/5763 --- docs/changelog.md | 1 + wezterm-gui/src/overlay/quickselect.rs | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/changelog.md b/docs/changelog.md index 8548c02d2..16b1562ed 100644 --- a/docs/changelog.md +++ b/docs/changelog.md @@ -80,6 +80,7 @@ As features stabilize some brief notes about them will accumulate here. * Render invalidation issue when closing tabs other than the last tab. Thanks to @Mrreadiness! #5441 #5304 * Search mode now accepts composed input from the IME. Thanks to @kenchou! #5564 +* Quick select mode will now accept unix paths with `//` in them. #5763 #### Updated * Bundled conpty.dll and OpenConsole.exe to build 1.19.240130002.nupkg diff --git a/wezterm-gui/src/overlay/quickselect.rs b/wezterm-gui/src/overlay/quickselect.rs index c5b0fcdc6..db631fbe8 100644 --- a/wezterm-gui/src/overlay/quickselect.rs +++ b/wezterm-gui/src/overlay/quickselect.rs @@ -27,7 +27,7 @@ const PATTERNS: [&str; 14] = [ // markdown_url r"\[[^]]*\]\(([^)]+)\)", // url - r"(?:https?://|git@|git://|ssh://|ftp://|file:///)\S+", + r"(?:https?://|git@|git://|ssh://|ftp://|file://)\S+", // diff_a r"--- a/(\S+)", // diff_b @@ -35,7 +35,7 @@ const PATTERNS: [&str; 14] = [ // docker r"sha256:([0-9a-f]{64})", // path - r"(?:[.\w\-@~]+)?(?:/[.\w\-@]+)+", + r"(?:[.\w\-@~]+)?(?:/+[.\w\-@]+)+", // color r"#[0-9a-fA-F]{6}", // uuid