-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
(#1107) Handle detach/retach operaiton in the cli
Closes #1107
- Loading branch information
1 parent
562e3c0
commit cc582a2
Showing
5 changed files
with
180 additions
and
70 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
package cmd | ||
|
||
import ( | ||
"github.com/criblio/scope/internal" | ||
"github.com/spf13/cobra" | ||
) | ||
|
||
// detachCmd represents the run command | ||
var detachCmd = &cobra.Command{ | ||
Use: "detach [flags] PID | <process_name>", | ||
Short: "Unscope a currently-running process", | ||
Long: `Unscopes a currently-running process identified by PID or <process_name>.`, | ||
Example: `scope detach 1000 | ||
scope detach firefox`, | ||
Args: cobra.ExactArgs(1), | ||
RunE: func(cmd *cobra.Command, args []string) error { | ||
internal.InitConfig() | ||
return rc.Detach(args) | ||
}, | ||
} | ||
|
||
func init() { | ||
RootCmd.AddCommand(detachCmd) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters