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

Post a Comment

Add a New Comment Rich Markup
   

Discussion

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

Since hyperlinks in text output are becoming commonplace (see https://gist.gith ... db1944c9f3cb5feda and https://www.iterm ... 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 ... seqs/ctlseqs.html :


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


Bruno Haible <haible>

 

Attached Files

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

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

Attach Files:
   
   
Comment:
   

 

Dependencies

This item does not depend on any other items.

No items depend on this one.

 

Mail Notification Carbon-Copy List

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

    Please enter the title of George Orwell's famous dystopian book (it's a date):

    History

    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.16-a7ba.
    Corresponding source code