mirror of
https://github.com/alacritty/alacritty.git
synced 2025-11-06 22:44:18 -05:00
Add support for hyperlink escape sequence
This commit adds support for hyperlink escape sequence `OSC 8 ; params ; URI ST`. The configuration option responsible for those is `hints.enabled.hyperlinks`. Fixes #922.
This commit is contained in:
parent
8451b75689
commit
694a52bcff
23 changed files with 1054 additions and 262 deletions
|
|
@ -28,15 +28,36 @@ macro_rules! ref_tests {
|
|||
}
|
||||
|
||||
ref_tests! {
|
||||
alt_reset
|
||||
clear_underline
|
||||
colored_reset
|
||||
colored_underline
|
||||
csi_rep
|
||||
decaln_reset
|
||||
deccolm_reset
|
||||
delete_chars_reset
|
||||
delete_lines
|
||||
erase_chars_reset
|
||||
fish_cc
|
||||
grid_reset
|
||||
history
|
||||
hyperlinks
|
||||
indexed_256_colors
|
||||
insert_blank_reset
|
||||
issue_855
|
||||
ll
|
||||
newline_with_cursor_beyond_scroll_region
|
||||
region_scroll_down
|
||||
row_reset
|
||||
saved_cursor
|
||||
saved_cursor_alt
|
||||
scroll_up_reset
|
||||
selective_erasure
|
||||
sgr
|
||||
tab_rendering
|
||||
tmux_git_log
|
||||
tmux_htop
|
||||
underline
|
||||
vim_24bitcolors_bce
|
||||
vim_large_window_scroll
|
||||
vim_simple_edit
|
||||
|
|
@ -46,29 +67,9 @@ ref_tests! {
|
|||
vttest_origin_mode_2
|
||||
vttest_scroll
|
||||
vttest_tab_clear_set
|
||||
zsh_tab_completion
|
||||
history
|
||||
grid_reset
|
||||
row_reset
|
||||
zerowidth
|
||||
selective_erasure
|
||||
colored_reset
|
||||
colored_underline
|
||||
delete_lines
|
||||
delete_chars_reset
|
||||
alt_reset
|
||||
deccolm_reset
|
||||
decaln_reset
|
||||
insert_blank_reset
|
||||
erase_chars_reset
|
||||
scroll_up_reset
|
||||
clear_underline
|
||||
region_scroll_down
|
||||
wrapline_alt_toggle
|
||||
saved_cursor
|
||||
saved_cursor_alt
|
||||
sgr
|
||||
underline
|
||||
zerowidth
|
||||
zsh_tab_completion
|
||||
}
|
||||
|
||||
fn read_u8<P>(path: P) -> Vec<u8>
|
||||
|
|
|
|||
10
alacritty_terminal/tests/ref/hyperlinks/alacritty.recording
Normal file
10
alacritty_terminal/tests/ref/hyperlinks/alacritty.recording
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
[?2004hsh-5.1$ [7mprintf '\e]8;;https://example.com\e\\foo\e]8;;\e\\\n'[27m
[C[C[C[C[C[C[C[Cprintf '\e]8;;https://example.com\e\\foo\e]8;;\e\\\n'
|
||||
[?2004l
]8;;https://example.com\foo]8;;\
|
||||
[?2004hsh-5.1$ [7mprintf '\e]8;;https://example.com\e\\foo\e]8;;\e\\\n'[27m
[C[C[C[C[C[C[C[Cprintf '\e]8;;https://example.com\e\\foo\e]8;;\e\\\n'
|
||||
[?2004l
]8;;https://example.com\foo]8;;\
|
||||
[?2004hsh-5.1$ [7mprintf '\e]8;id=42;https://example.com\e\\bar\e]8;;\e\\\n'[27m
[C[C[C[C[C[C[C[Cprintf '\e]8;id=42;https://example.com\e\\bar\e]8;;\e\\\n'
|
||||
[?2004l
]8;id=42;https://example.com\bar]8;;\
|
||||
[?2004hsh-5.1$ [7mprintf '\e]8;id=42;https://example.com\e\\bar\e]8;;\e\\\n'[27m
[C[C[C[C[C[C[C[Cprintf '\e]8;id=42;https://example.com\e\\bar\e]8;;\e\\\n'
|
||||
[?2004l
]8;id=42;https://example.com\bar]8;;\
|
||||
[?2004hsh-5.1$ [?2004l
|
||||
exit
|
||||
1
alacritty_terminal/tests/ref/hyperlinks/config.json
Normal file
1
alacritty_terminal/tests/ref/hyperlinks/config.json
Normal file
|
|
@ -0,0 +1 @@
|
|||
{"history_size":0}
|
||||
1
alacritty_terminal/tests/ref/hyperlinks/grid.json
Normal file
1
alacritty_terminal/tests/ref/hyperlinks/grid.json
Normal file
File diff suppressed because one or more lines are too long
1
alacritty_terminal/tests/ref/hyperlinks/size.json
Normal file
1
alacritty_terminal/tests/ref/hyperlinks/size.json
Normal file
|
|
@ -0,0 +1 @@
|
|||
{"columns":140,"screen_lines":38}
|
||||
Loading…
Add table
Add a link
Reference in a new issue