77 "strings"
88
99 "github.com/carapace-sh/carapace"
10- "github.com/carapace-sh/carapace-bin/internal/actions/net/ssh"
1110 "github.com/carapace-sh/carapace/pkg/execlog"
1211 "github.com/carapace-sh/carapace/pkg/style"
1312)
@@ -39,9 +38,8 @@ func ActionHosts() carapace.Action {
3938 batch = append (batch , carapace .ActionMessage (err .Error ()))
4039 }
4140 }
42- batch = append (batch , ssh .ActionHosts ().Style (style .Yellow ).Suppress (`open .*/.ssh/config: no such file or directory` ))
4341 return batch .ToA ()
44- }).Tag ("hosts" )
42+ }).Tag ("known hosts" )
4543}
4644
4745type IncludedDevices struct {
@@ -179,7 +177,7 @@ func ActionBssids() carapace.Action {
179177
180178 vals := make ([]string , 0 )
181179 for _ , line := range lines [:len (lines )- 1 ] {
182- mac := strings .Replace (line [:22 ], `\:` , `:` , - 1 )
180+ mac := strings .ReplaceAll (line [:22 ], `\:` , `:` )
183181 splitted := strings .Split (line [23 :], ":" )
184182 if name := splitted [0 ]; name != "" {
185183 vals = append (vals , mac , splitted [0 ], styleForBars (splitted [1 ]))
@@ -201,7 +199,7 @@ func ActionSsids() carapace.Action {
201199
202200 vals := make ([]string , 0 )
203201 for _ , line := range lines [:len (lines )- 1 ] {
204- mac := strings .Replace (line [:22 ], `\:` , `:` , - 1 )
202+ mac := strings .ReplaceAll (line [:22 ], `\:` , `:` )
205203 splitted := strings .Split (line [23 :], ":" )
206204 if name := splitted [0 ]; name != "" {
207205 vals = append (vals , splitted [0 ], mac , styleForBars (splitted [1 ]))
0 commit comments