mirror of https://github.com/liamg/aminal.git
Using shell from config if specified
Don't execute extra command if it's not needed
This commit is contained in:
parent
58dd4bf3a1
commit
9ebee461e4
8
main.go
8
main.go
|
@ -31,13 +31,13 @@ func main() {
|
||||||
logger.Fatalf("Failed to allocate pty: %s", err)
|
logger.Fatalf("Failed to allocate pty: %s", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
shellStr, err := loginshell.Shell()
|
shellStr := conf.Shell
|
||||||
|
if shellStr == "" {
|
||||||
|
loginShell, err := loginshell.Shell()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
logger.Fatalf("Failed to ascertain your shell: %s", err)
|
logger.Fatalf("Failed to ascertain your shell: %s", err)
|
||||||
}
|
}
|
||||||
|
shellStr = loginShell
|
||||||
if conf.Shell != "" {
|
|
||||||
shellStr = conf.Shell
|
|
||||||
}
|
}
|
||||||
|
|
||||||
os.Setenv("TERM", "xterm-256color") // controversial! easier than installing terminfo everywhere, but obviously going to be slightly different to xterm functionality, so we'll see...
|
os.Setenv("TERM", "xterm-256color") // controversial! easier than installing terminfo everywhere, but obviously going to be slightly different to xterm functionality, so we'll see...
|
||||||
|
|
Loading…
Reference in New Issue