mirror of
https://github.com/yudai/gotty.git
synced 2026-03-08 06:32:35 +01:00
Show command and hostname in windows title
This commit is contained in:
parent
5ee6356242
commit
67b54b7f20
6 changed files with 113 additions and 53 deletions
7
main.go
7
main.go
|
|
@ -43,6 +43,12 @@ func main() {
|
|||
Usage: "Add a random string to the URL",
|
||||
EnvVar: "GOTTY_RANDOM_URL",
|
||||
},
|
||||
cli.StringFlag{
|
||||
Name: "title-format",
|
||||
Value: "GoTTY - {{ .Command }} ({{ .Hostname }})",
|
||||
Usage: "Title format of browser window",
|
||||
EnvVar: "GOTTY_title-format",
|
||||
},
|
||||
}
|
||||
cmd.Action = func(c *cli.Context) {
|
||||
if len(c.Args()) == 0 {
|
||||
|
|
@ -57,6 +63,7 @@ func main() {
|
|||
c.Bool("permit-write"),
|
||||
c.String("credential"),
|
||||
c.Bool("random-url"),
|
||||
c.String("title-format"),
|
||||
c.Args(),
|
||||
},
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue