fix: make -i false by default and fix cmdflag comparing

pull/45/head
sammy 2021-05-01 01:50:22 -04:00
parent 520fdaf728
commit a7d8851de0
No known key found for this signature in database
GPG Key ID: 50EE40A2809851F5
1 changed files with 3 additions and 2 deletions

View File

@ -46,12 +46,13 @@ func main() {
// loginshflag // loginshflag
// TODO: issue #37 // TODO: issue #37
_ = getopt.BoolLong("login", 'l', "Makes Hilbish act like a login shell") _ = getopt.BoolLong("login", 'l', "Makes Hilbish act like a login shell")
interactiveflag := getopt.BoolLong("interactive", 'i', "Force Hilbish to be an interactive shell") _ = getopt.BoolLong("interactive", 'i', "Force Hilbish to be an interactive shell")
getopt.Parse() getopt.Parse()
args := getopt.Args() args := getopt.Args()
interactiveflag := getopt.Lookup('i').Seen()
if *cmdflag != "" || *interactiveflag { if *cmdflag == "" || interactiveflag {
interactive = true interactive = true
} }