From f9bb61cbc3a5755727cad8f8866cf3cb5885ac07 Mon Sep 17 00:00:00 2001 From: Gregory Rudolph Date: Fri, 4 Oct 2019 12:55:04 -0400 Subject: [PATCH] Allow users to join channel by supplying args --- main.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/main.go b/main.go index 7cc89a2..7f2db61 100644 --- a/main.go +++ b/main.go @@ -3,6 +3,7 @@ package main import ( "fmt" "log" + "os" "strings" "time" @@ -35,6 +36,11 @@ func main() { g = kbtui go populateList() go updateChatWindow() + if len(os.Args) > 1 { + os.Args[0] = "join" + RunCommand(os.Args...) + + } if err := initKeybindings(); err != nil { log.Printf("%+v", err) }