If I copy some text containing a hyperlink and then paste into another application that accepts it, then the text and its hyperlink is correctly copied over.
How can I access this hyperlink via the command line? Using pbpaste
or pbpaste -Prefer rtf
just results in the text being pasted without the hyperlink.
For example if I copy the following text: "Some text with a hyperlink in it." from this webpage and then use pbpaste -Prefer rtf
I see "Some text with a hyperlink in it." in the terminal but the https://example.com hyperlink is not shown anywhere / it is lost. Is there a way to access this information from the clipboard in a terminal? The data is there because if I paste into another application like the Notes application, the hyperlink will be present in the text pasted.
** Edit **
I am not expecting the output from pbpaste or any other tool to give a clickable link in the terminal. I do not believe that is even possible for terminals to provide that. I do want the hyperlink to come out in some standard format though. To extend the example above, perhaps it is displayed as the following string of characters: Some text with a [hyperlink](https://example.com) in it.
or whatever format can be parsed to extract the URL.
Alternatively just being able to access the raw string of bits/bytes on the clipboard and writing something to parse them myself would be fine too.