0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

Go言語 + Windows Terminalで、任意の文字にハイパーリンクを埋め込むエスケープシーケンス

Last updated at Posted at 2022-03-05

結論1「Googleへのリンク」

package main
import (
	"fmt"
)
func main() {
	fmt.Println("\033]8;;https://www.google.com/\aGoogle\033]8;;\aへリンク")//->Googleへリンク
}

結論2「📁ローカルフォルダへのリンク」

package main
import (
	"fmt"
)
func main() {
	fmt.Print("\033]8;;file://C:/Users\aLocal\033]8;;\a←リンク")//->Local←リンク
}

参考

ターミナルエミュレータ内でクリッカブルなリンクを作る方法
How to add hyperlinks to a terminal [ Node.js ]
Explicit hyperlinks and context information for your terminal
Hyperlinks (a.k.a. HTML-like anchors) in terminal emulators

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?