bugGNU Teseq - Bugs: bug #56770, Add support for hyperlink sequence...

 
 

bug #56770: Add support for hyperlink sequence (OSC 8)

Submitter:  Bruno Haible <haible>
Submitted:  Sat 17 Aug 2019 10:43:13 PM UTC
   
 
Severity:  3 - Normal Priority:  * 5 - Normal
Status:  None Assigned to:  None
Open/Closed:  Open
* Mandatory Fields

Add a New Comment Rich Markup
   

Sat 17 Aug 2019 10:43:13 PM UTC, original submission:  

Since hyperlinks in text output are becoming commonplace (see https://gist.github.com/egmontkob/eb114294efbcd5adb1944c9f3cb5feda and https://www.iterm2.com/documentation-escape-codes.html ), it is useful if GNU teseq prints useful info for this escape sequence.

The attached patch does this.

Example:

$ printf '\e]8;;http://www.google.com/\e\\Google\e]8;;\e\\\n' | ./teseq
: Esc ] 8 ;  ; http://www.google.com/
& OSC: OPERATING SYSTEM COMMAND
" Set hyperlink to |http://www.google.com/|
: Esc \
& ST: STRING TERMINATOR
|Google|
: Esc ] 8 ;  ;
& OSC: OPERATING SYSTEM COMMAND
" Set hyperlink to ||
: Esc \
& ST: STRING TERMINATOR
. LF/^J

$ printf '\e]8;id=12;http://www.google.com/\e\\Google\e]8;;\e\\\n' | ./teseq
: Esc ] 8 ; id=12 ; http://www.google.com/
& OSC: OPERATING SYSTEM COMMAND
" Set hyperlink to |http://www.google.com/| with params id=12
: Esc \
& ST: STRING TERMINATOR
|Google|
: Esc ] 8 ;  ;
& OSC: OPERATING SYSTEM COMMAND
" Set hyperlink to ||
: Esc \
& ST: STRING TERMINATOR
. LF/^J


In passing, let me also add support for OSC 0 and OSC 2, which are documented in https://invisible-island.net/xterm/ctlseqs/ctlseqs.html :


$ xtermset -title Foo | teseq
: Esc ] 2 ; Foo
& OSC: OPERATING SYSTEM COMMAND
" Set window title to |Foo|


Bruno Haible <haible>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

Attached Files
file #47359:  teseq-osc.diff added by haible (6KiB - text/x-patch)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by haible (Submitted the item)
  • -email is unavailable- added by haible
  •  

    Follow 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2019-08-17 haible Attached File- Added teseq-osc.diff, #47359
        Carbon-Copy- Added -email is unavailable-

    Back to the top

    Powered by Savane 3.13-cf05.
    Corresponding source code