mirror of
https://github.com/verdverm/chatgpt
synced 2024-11-14 18:12:45 +00:00
Compare commits
2 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
51618adc78 | ||
|
39b5f92779 |
2
main.go
2
main.go
@ -169,7 +169,7 @@ func main() {
|
|||||||
// no args, or interactive... read from stdin
|
// no args, or interactive... read from stdin
|
||||||
// this is mainly for replacing text in vim
|
// this is mainly for replacing text in vim
|
||||||
fi, _ := os.Stdin.Stat()
|
fi, _ := os.Stdin.Stat()
|
||||||
inputIsFromPipe = (fi.Mode() & os.ModeCharDevice) == 0
|
inputIsFromPipe := (fi.Mode() & os.ModeCharDevice) == 0
|
||||||
if len(args) == 0 && !PromptMode && inputIsFromPipe {
|
if len(args) == 0 && !PromptMode && inputIsFromPipe {
|
||||||
reader := bufio.NewReader(os.Stdin)
|
reader := bufio.NewReader(os.Stdin)
|
||||||
var buf bytes.Buffer
|
var buf bytes.Buffer
|
||||||
|
Loading…
Reference in New Issue
Block a user