Show command and hostname in windows title

This commit is contained in:
Iwasaki Yudai 2015-08-23 14:04:31 +09:00
parent 5ee6356242
commit 67b54b7f20
6 changed files with 113 additions and 53 deletions

View file

@ -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(),
},
)