Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Cmd = &Z.Cmd{ Name: "del", Summary: `del let you delete a node from the tree`, Commands: []*Z.Cmd{ help.Cmd, }, Call: func(cmd *Z.Cmd, args ...string) error { dStore := &store.LocalStore{Path: Z.Vars.Get(".darwin.dir")} d, err := darwin.Load( dStore, ) if err != nil { return err } node, err := search.Search(d) if err != nil { return err } qs := &survey.Confirm{ Message: fmt.Sprintf("Are you sure you want to delete %s?", node.Name), } var answer bool err = survey.AskOne(qs, &answer) if err != nil { return err } if answer { err = d.Delete(node) } return nil }, }
Cmd is the root command
Functions ¶
This section is empty.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.