Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into search
Browse files Browse the repository at this point in the history
  • Loading branch information
gcla committed Jun 1, 2022
2 parents 6af7638 1ef877d commit 5e28c15
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 19 deletions.
9 changes: 3 additions & 6 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 11,7 @@ require (
github.com/gcla/deep v1.0.2
github.com/gcla/gowid v1.3.1-0.20220530181752-072f0882aae0
github.com/gcla/tail v1.0.1-0.20190505190527-650e90873359
github.com/gcla/term v0.0.0-20220601234708-3e6af2ebff27
github.com/gdamore/tcell/v2 v2.5.0
github.com/gin-gonic/gin v1.7.0 // indirect
github.com/go-test/deep v1.0.2 // indirect
Expand All @@ -24,7 25,6 @@ require (
github.com/mreiferson/go-snappystream v0.2.3
github.com/pelletier/go-toml v1.8.1 // indirect
github.com/pkg/errors v0.9.1
github.com/pkg/term v1.1.0
github.com/psanford/wormhole-william v1.0.6-0.20210402195004-049df45b8d5a
github.com/rakyll/statik v0.1.7
github.com/shibukawa/configdir v0.0.0-20170330084843-e180dbdc8da0
Expand All @@ -37,6 37,7 @@ require (
github.com/tevino/abool v1.2.0
gitlab.com/jonas.jasas/condchan v0.0.0-20190210165812-36637ad2b5bc // indirect
golang.org/x/net v0.0.0-20201224014010-6772e930b67b // indirect
golang.org/x/sys v0.0.0-20220318055525-2edf467146b5
gopkg.in/fsnotify/fsnotify.v1 v1.4.7
gopkg.in/ini.v1 v1.62.0 // indirect
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 // indirect
Expand All @@ -45,8 46,4 @@ require (
modernc.org/mathutil v1.4.1 // indirect
)

replace github.com/pkg/term => github.com/gcla/term v0.0.0-20191015020247-31cba2f9f402

replace github.com/gcla/gowid => /home/gcla/go/src/github.com/gcla/gowid

//replace github.com/gdamore/tcell/v2 => /home/gcla/source/tcell
//replace github.com/gcla/gowid => /home/gcla/go/src/github.com/gcla/gowid
10 changes: 3 additions & 7 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -57,22 57,19 @@ github.com/fsnotify/fsnotify v1.4.9 h1:hsms1Qyu0jgnwNXIxa /V/PDsU6CfLf6CNO8H7IWo
github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE 3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ=
github.com/gcla/deep v1.0.2 h1:qBOx6eepcOSRYnHJ f2ih4hP4Vca1YnLtXxp73n5KWI=
github.com/gcla/deep v1.0.2/go.mod h1:evE9pbpSGhItmFoBIk8hPOIC/keKTGYhFl6Le1Av GE=
github.com/gcla/gowid v1.3.1-0.20220427034012-f8f1f91caee4 h1:SBgNi1aZzqhP KlSAu8ppxYIr68XLN/mC7I1XSUFuHE=
github.com/gcla/gowid v1.3.1-0.20220427034012-f8f1f91caee4/go.mod h1:7T4Xzfznq31XvQyAOX SZzQjvF7RX16mjXDXGB7R/44=
github.com/gcla/gowid v1.3.1-0.20220530181752-072f0882aae0 h1:myaHMntGEyzp1nWI8QL6596lwKKxclaPOS9D1XlvOGI=
github.com/gcla/gowid v1.3.1-0.20220530181752-072f0882aae0/go.mod h1:7T4Xzfznq31XvQyAOX SZzQjvF7RX16mjXDXGB7R/44=
github.com/gcla/tail v1.0.1-0.20190505190527-650e90873359 h1:3xEhacR7pIJV8daurdBygptxhzTJeYFqJp1V6SDl pE=
github.com/gcla/tail v1.0.1-0.20190505190527-650e90873359/go.mod h1:Wn pZpM98JHSOYkPDtmdvlqmc0OzQGHWOsHB2d28WtQ=
github.com/gcla/term v0.0.0-20191015020247-31cba2f9f402 h1:d8cpYNgYjXDjvrdnSaFy4 o1D3BpPUKTBIcijrBKv4c=
github.com/gcla/term v0.0.0-20191015020247-31cba2f9f402/go.mod h1:YCPU G35BFc/575HWMl8oeqq dTbunufWbWaV0Y2sqY=
github.com/gcla/term v0.0.0-20220601234708-3e6af2ebff27 h1:OmzD2vZl1UeSblMmUo4mKjnrtsn VLxhkkqnDOPHrXY=
github.com/gcla/term v0.0.0-20220601234708-3e6af2ebff27/go.mod h1:clvpNvF78b5j4SoZwUykoKNbZwjlDmFeHGbKeixkScI=
github.com/gdamore/encoding v1.0.0 h1: 7OoQ1Bc6eTm5niUzBa0Ctsh6JbMW6Ra YNuAtDBdko=
github.com/gdamore/encoding v1.0.0/go.mod h1:alR0ol34c49FCSBLjhosxzcPHQbf2trDkoo5dl VrEg=
github.com/gdamore/tcell/v2 v2.5.0 h1:/LA5f/wqTP5mWT79czngibKVVx5wOgdFTIXPQ68fMO8=
github.com/gdamore/tcell/v2 v2.5.0/go.mod h1:wSkrPaXoiIWZqW/g7Px4xc79di6FTcpB8tvaKJ6uGBo=
github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04=
github.com/gin-contrib/sse v0.1.0 h1:Y/yl/ YNO8GZSjAhjMsSuLt29uWRFHdHYUb5lYOV9qE=
github.com/gin-contrib/sse v0.1.0/go.mod h1:RHrZQHXnP2xjPF u1gW/2HnVO7nvIa9PG3Gm fLHvGI=
github.com/gin-gonic/gin v1.6.3 h1:ahKqKTFpO5KTPHxWZjEdPScmYaGtLo8Y4DMHoEsnp14=
github.com/gin-gonic/gin v1.6.3/go.mod h1:75u5sXoLsGZoRN5Sgbi1eraJ4GU3 wFwWzhwvtwp4M=
github.com/gin-gonic/gin v1.7.0 h1:jGB9xAJQ12AIGNB4HguylppmDK1Am9ppF7XnGXXJuoU=
github.com/gin-gonic/gin v1.7.0/go.mod h1:jD2toBW3GZUr5UMcdrwQA10I7RuaFOl/SGeDjXkfUtY=
Expand All @@ -86,7 83,6 @@ github.com/go-playground/locales v0.13.0 h1:HyWk6mgj5qFqCT5fjGBuRArbVDfE4hi8 e8c
github.com/go-playground/locales v0.13.0/go.mod h1:taPMhCMXrRLJO55olJkUXHZBHCxTMfnGwq/HNwmWNS8=
github.com/go-playground/universal-translator v0.17.0 h1:icxd5fm REJzpZx7ZfpaD876Lmtgy7VtROAbHHXk8no=
github.com/go-playground/universal-translator v0.17.0/go.mod h1:UkSxE5sNxxRwHyU Scu5vgOQjsIJAF8j9muTVoKLVtA=
github.com/go-playground/validator/v10 v10.2.0 h1:KgJ0snyC2R9VXYN2rneOtQcw5aHQB1Vv0sFl1UcHBOY=
github.com/go-playground/validator/v10 v10.2.0/go.mod h1:uOYAAleCW8F/7oMFd6aG0GOhaH6EGOAJShg8Id5JGkI=
github.com/go-playground/validator/v10 v10.4.1 h1:pH2c5ADXtd66mxoE0Zm9SUhxE20r7aM3F26W0hOn GE=
github.com/go-playground/validator/v10 v10.4.1/go.mod h1:nlOn6nFhuKACm19sB/8EGNn9GlaMV7XkbRSipzJ0Ii4=
Expand Down Expand Up @@ -384,10 380,10 @@ golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7w
golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20191010194322-b09406accb47/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200116001909-b77863299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200909081042-eff7692f9009/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20220318055525-2edf467146b5 h1:saXMvIOKvRFwbOMicHXr0B1uwoxq9dGmLe5ExMES6c4=
golang.org/x/sys v0.0.0-20220318055525-2edf467146b5/go.mod h1:oPkhp1MJrh7nUepCBck5 mAzfO9JrbApNNgaTdGDITg=
Expand Down
13 changes: 7 additions & 6 deletions tty/tty.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 10,14 @@ import (
"os"
"syscall"

"github.com/pkg/term/termios"
"github.com/gcla/term/termios"
"golang.org/x/sys/unix"
)

//======================================================================

type TerminalSignals struct {
tiosp syscall.Termios
tiosp *unix.Termios
out *os.File
set bool
}
Expand All @@ -28,7 29,7 @@ func (t *TerminalSignals) IsSet() bool {
func (t *TerminalSignals) Restore() {
if t.out != nil {
fd := uintptr(t.out.Fd())
termios.Tcsetattr(fd, termios.TCSANOW, &t.tiosp)
termios.Tcsetattr(fd, termios.TCSANOW, t.tiosp)

t.out.Close()
t.out = nil
Expand All @@ -38,7 39,7 @@ func (t *TerminalSignals) Restore() {

func (t *TerminalSignals) Set() error {
var e error
var newtios syscall.Termios
var newtios unix.Termios
var fd uintptr

outtty := "/dev/tty"
Expand All @@ -54,11 55,11 @@ func (t *TerminalSignals) Set() error {

fd = uintptr(t.out.Fd())

if e = termios.Tcgetattr(fd, &t.tiosp); e != nil {
if t.tiosp, e = termios.Tcgetattr(fd); e != nil {
goto failed
}

newtios = t.tiosp
newtios = *t.tiosp
newtios.Lflag |= syscall.ISIG

// Enable ctrl-z for suspending the foreground process group via the
Expand Down

0 comments on commit 5e28c15

Please sign in to comment.