mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-06-14 11:02:27 +03:00
Revert commits related to using an interactive shell for running shell commands
This reverts commitsf28b6f439d
,dbd407c01d
,5fac40c129
, and5a3049485c
.
This commit is contained in:
@ -14,8 +14,6 @@ type ICmdObjBuilder interface {
|
||||
New(args []string) ICmdObj
|
||||
// NewShell takes a string like `git commit` and returns an executable shell command for it e.g. `sh -c 'git commit'`
|
||||
NewShell(commandStr string) ICmdObj
|
||||
// Like NewShell, but uses the user's shell rather than "bash", and passes -i to it
|
||||
NewInteractiveShell(commandStr string) ICmdObj
|
||||
// Quote wraps a string in quotes with any necessary escaping applied. The reason for bundling this up with the other methods in this interface is that we basically always need to make use of this when creating new command objects.
|
||||
Quote(str string) string
|
||||
}
|
||||
@ -51,13 +49,6 @@ func (self *CmdObjBuilder) NewShell(commandStr string) ICmdObj {
|
||||
return self.New(cmdArgs)
|
||||
}
|
||||
|
||||
func (self *CmdObjBuilder) NewInteractiveShell(commandStr string) ICmdObj {
|
||||
quotedCommand := self.quotedCommandString(commandStr + self.platform.InteractiveShellExit)
|
||||
cmdArgs := str.ToArgv(fmt.Sprintf("%s %s %s %s", self.platform.InteractiveShell, self.platform.InteractiveShellArg, self.platform.ShellArg, quotedCommand))
|
||||
|
||||
return self.New(cmdArgs)
|
||||
}
|
||||
|
||||
func (self *CmdObjBuilder) quotedCommandString(commandStr string) string {
|
||||
// Windows does not seem to like quotes around the command
|
||||
if self.platform.OS == "windows" {
|
||||
|
Reference in New Issue
Block a user