Hello everyone,
so I am trying to make a custom linux shell in golang, among other things, I want this shell to be able to run BASH shell.
Like when we are prompted with sh shell
$
executing /bin/bash, provides bash prompt
$ /bin/bash
user@hostName:~#
similarly, I want my golang shell to provide me with bash shell
myPrompt> /bin/bash
user@hostName:~#
I have tried multiple things:
1. Replicating bash prompt, when /bin/bash is received, and getting os.Stdin, and executing using os/exec Output() function.
2. Trying to make stdpipes and then channel input/output via them, while using cmd.Start() and cmd.Waint().
these did not help, I am looking for some help from the experts.
Thank you if you read this.
Super thank you, if you have a solution :).
PFA: My shell.go file.