Skip to content

Commit

Permalink
Merge pull request #138 from blacknon/develop
Browse files Browse the repository at this point in the history
Version 0.6.9
  • Loading branch information
blacknon authored Jul 10, 2024
2 parents 26d1df0 + f3d28a3 commit 190bbba
Show file tree
Hide file tree
Showing 28 changed files with 46 additions and 17 deletions.
16 changes: 16 additions & 0 deletions cmd/lscp/args.go
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,12 @@ USAGE:
from_l.MultiFlag = false
from_l.View()
fromServer = from_l.SelectName

// Check selected
if len(fromServer) == 0 {
fmt.Fprintln(os.Stderr, "Server config is not set.")
os.Exit(1)
}
if fromServer[0] == "ServerName" {
fmt.Fprintln(os.Stderr, "Server not selected.")
os.Exit(1)
Expand All @@ -156,6 +162,11 @@ USAGE:
to_l.MultiFlag = true
to_l.View()
toServer = to_l.SelectName
if len(toServer) == 0 {
fmt.Fprintln(os.Stderr, "Server config is not set.")
os.Exit(1)
}

if toServer[0] == "ServerName" {
fmt.Fprintln(os.Stderr, "Server not selected.")
os.Exit(1)
Expand All @@ -171,6 +182,11 @@ USAGE:
l.View()

selected = l.SelectName
// Check selected
if len(selected) == 0 {
fmt.Fprintln(os.Stderr, "Server config is not set.")
os.Exit(1)
}
if selected[0] == "ServerName" {
fmt.Fprintln(os.Stderr, "Server not selected.")
os.Exit(1)
Expand Down
6 changes: 6 additions & 0 deletions cmd/lsftp/args.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,12 @@ USAGE:

// selected check
selected := l.SelectName

// Check selected
if len(selected) == 0 {
fmt.Fprintln(os.Stderr, "Server config is not set.")
os.Exit(1)
}
if selected[0] == "ServerName" {
fmt.Fprintln(os.Stderr, "Server not selected.")
os.Exit(1)
Expand Down
6 changes: 6 additions & 0 deletions cmd/lssh/args.go
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,12 @@ USAGE:

l.View()
selected = l.SelectName

// Check selected
if len(selected) == 0 {
fmt.Fprintln(os.Stderr, "Server config is not set.")
os.Exit(1)
}
if selected[0] == "ServerName" {
fmt.Fprintln(os.Stderr, "Server not selected.")
os.Exit(1)
Expand Down
10 changes: 4 additions & 6 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,10 @@ require (
github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 // indirect
github.com/BurntSushi/toml v0.3.1
github.com/ScaleFT/sshkeys v0.0.0-20200327173127-6142f742bca5 // indirect
github.com/ThalesIgnite/crypto11 v1.2.5 // indirect
github.com/VividCortex/ewma v1.2.0 // indirect
github.com/acarl005/stripansi v0.0.0-20180116102854-5a71ef0e047d // indirect
github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5 // indirect
github.com/blacknon/go-sshlib v0.1.12
github.com/blacknon/go-sshlib v0.1.13
github.com/blacknon/go-x11auth v0.1.0 // indirect
github.com/blacknon/textcol v0.0.1
github.com/c-bata/go-prompt v0.2.6
Expand Down Expand Up @@ -50,8 +49,7 @@ require (
gopkg.in/yaml.v3 v3.0.1 // indirect
)

require github.com/blacknon/crypto11 v1.2.7 // indirect

// replace
replace (
github.com/ThalesIgnite/crypto11 v1.2.5 => github.com/blacknon/crypto11 v1.2.6
github.com/c-bata/go-prompt v0.2.6 => github.com/blacknon/go-prompt v0.2.7
)
replace github.com/c-bata/go-prompt v0.2.6 => github.com/blacknon/go-prompt v0.2.7
9 changes: 4 additions & 5 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ github.com/acarl005/stripansi v0.0.0-20180116102854-5a71ef0e047d h1:licZJFw2RwpH
github.com/acarl005/stripansi v0.0.0-20180116102854-5a71ef0e047d/go.mod h1:asat636LX7Bqt5lYEZ27JNDcqxfjdBQuJ/MM4CN/Lzo=
github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5 h1:0CwZNZbxp69SHPdPJAN/hZIm0C4OItdklCFmMRWYpio=
github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkYZB8zMSxRWpUBQtwG5a7fFgvEO+odwuTv2gs=
github.com/blacknon/crypto11 v1.2.6 h1:Mv+Boto0qVR1O2k5lmoCYcyXfiQYY7mQ1P/TcK5Tw5c=
github.com/blacknon/crypto11 v1.2.6/go.mod h1:HThRIRjHpJIJwcExGgNuPCyf26HqcFVTTAnipaXWz7M=
github.com/blacknon/crypto11 v1.2.7 h1:LKrnCeXAk4jQmpJTeg/tVvNjqEgKHIE+tYSNXQj8Fco=
github.com/blacknon/crypto11 v1.2.7/go.mod h1:Z24sFD9pMX3NdUFzX52ggcV7HurAYAGvxud73BrHudA=
github.com/blacknon/go-prompt v0.2.7 h1:dVdTqVplKvpT/k4bB9BlbcBYl/k6amYX5tvjYBmuKkI=
github.com/blacknon/go-prompt v0.2.7/go.mod h1:zNBmC/BPAyr+3ey1oRhPxuXJS9zz1lEmJpwaoQroe3w=
github.com/blacknon/go-sshlib v0.1.12 h1:K66DzwzF5RhlKQjcda0R7/FbvslXOayVd75UVzCKfZQ=
github.com/blacknon/go-sshlib v0.1.12/go.mod h1:EqEKtFd4DInkF3Ryx+YXnj70u7pJenVr4H3uEGEgoHI=
github.com/blacknon/go-sshlib v0.1.13 h1:QoFoMuGefHWOTr18riHoQux4/lVrrDmsfvBTNuueeNI=
github.com/blacknon/go-sshlib v0.1.13/go.mod h1:Kxbot2GEniRqBduRtw8Tq6E8XtPLrFEKFmAHdlR+ipk=
github.com/blacknon/go-x11auth v0.1.0 h1:SnljCPWcvglWeGAlKc1RAPMHnOfMpM9+GrTGEUQ1lqQ=
github.com/blacknon/go-x11auth v0.1.0/go.mod h1:SKOCa19LluXHyB+OaLYobquzceE0SWxVW7e/qU5xGBM=
github.com/blacknon/textcol v0.0.1 h1:x9h7yLPGyr8Pdz12XJ30h7Iz5mJlKd0CzfGYxhrmnk8=
Expand Down Expand Up @@ -75,7 +75,6 @@ github.com/sevlyar/go-daemon v0.1.5 h1:Zy/6jLbM8CfqJ4x4RPr7MJlSKt90f00kNM1D401C+
github.com/sevlyar/go-daemon v0.1.5/go.mod h1:6dJpPatBT9eUwM5VCw9Bt6CdX9Tk6UWvhW3MebLDRKE=
github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA=
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/stretchr/testify v1.7.1 h1:5TQK59W5E3v0r2duFAb7P95B6hEeOyEnHRa8MjYSMTY=
Expand Down
6 changes: 5 additions & 1 deletion list/list.go
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,11 @@ func (l *ListInfo) getFilterText() {

// View is display the list in TUI
func (l *ListInfo) View() {
l.getText()
if len(l.DataText) == 1 {
return
}

if err := termbox.Init(); err != nil {
panic(err)
}
Expand All @@ -192,7 +197,6 @@ func (l *ListInfo) View() {
// enable termbox mouse input
termbox.SetInputMode(termbox.InputMouse)

l.getText()
l.keyEvent()
}

Expand Down
2 changes: 1 addition & 1 deletion vendor/github.com/blacknon/go-sshlib/pkcs11.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions vendor/modules.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,6 @@ github.com/BurntSushi/toml
# github.com/ScaleFT/sshkeys v0.0.0-20200327173127-6142f742bca5
## explicit; go 1.13
github.com/ScaleFT/sshkeys
# github.com/ThalesIgnite/crypto11 v1.2.5 => github.com/blacknon/crypto11 v1.2.6
## explicit; go 1.13
github.com/ThalesIgnite/crypto11
# github.com/VividCortex/ewma v1.2.0
## explicit; go 1.12
github.com/VividCortex/ewma
Expand All @@ -20,7 +17,10 @@ github.com/acarl005/stripansi
# github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5
## explicit
github.com/armon/go-socks5
# github.com/blacknon/go-sshlib v0.1.12
# github.com/blacknon/crypto11 v1.2.7
## explicit; go 1.22
github.com/blacknon/crypto11
# github.com/blacknon/go-sshlib v0.1.13
## explicit; go 1.22.4
github.com/blacknon/go-sshlib
# github.com/blacknon/go-x11auth v0.1.0
Expand Down

0 comments on commit 190bbba

Please sign in to comment.