Skip to content

Commit

Permalink
fix: put --dst auto-complete
Browse files Browse the repository at this point in the history
  • Loading branch information
jm33-m0 committed Feb 21, 2025
1 parent e7ffe1a commit f6e9f5a
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
2 changes: 0 additions & 2 deletions core/internal/cc/base/agents/mgr.go
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,6 @@ func CmdSetActiveAgent(cmd *cobra.Command, args []string) {
select_agent := func(a *def.Emp3r0rAgent) {
live.ActiveAgent = a
logging.Successf("Now targeting %s", live.ActiveAgent.Tag)
logging.Printf("Run `file_manager` to open a SFTP session")
// autoCompleteAgentExes(target_to_set)
}

if target_to_set == nil {
Expand Down
3 changes: 2 additions & 1 deletion core/internal/cc/core/cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -307,6 +307,7 @@ func Emp3r0rCommands(app *console.Console) console.Commands {
rootCmd.AddCommand(putCmd)
carapace.Gen(putCmd).FlagCompletion(carapace.ActionMap{
"src": carapace.ActionFiles(),
"dst": carapace.ActionMultiParts("/", listRemoteDir),
})

screenshotCmd := &cobra.Command{
Expand All @@ -331,7 +332,7 @@ func Emp3r0rCommands(app *console.Console) console.Commands {
GroupID: "module",
Short: "List all modules",
Args: cobra.NoArgs,
Run: ListModules,
Run: CmdLsModules,
}
rootCmd.AddCommand(lsModCmd)

Expand Down
4 changes: 2 additions & 2 deletions core/internal/cc/core/modules.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import (
"github.com/spf13/cobra"
)

// ListModules list all available modules
func ListModules(_ *cobra.Command, _ []string) {
// CmdLsModules list all available modules
func CmdLsModules(_ *cobra.Command, _ []string) {
mod_comment_map := make(map[string]string)
for mod_name, mod := range def.Modules {
mod_comment_map[mod_name] = mod.Comment
Expand Down

0 comments on commit f6e9f5a

Please sign in to comment.