fork/gdu

git clone https://git.julia.blue/fork/gdu

cosmolifeat: move items to XDG trash with D key (#12) (#608)9ca5c60

ignore
591 B34 linesraw
1package tui
2
3// DeleteAction selects how an item is removed from the directory tree.
4type DeleteAction uint8
5
6const (
7	ActionDelete DeleteAction = iota
8	ActionEmpty
9	ActionMoveToTrash
10)
11
12func (a DeleteAction) Verb() string {
13	switch a {
14	case ActionEmpty:
15		return "empty"
16	case ActionMoveToTrash:
17		return "move to trash"
18	case ActionDelete:
19		return "delete"
20	}
21	return "delete"
22}
23
24func (a DeleteAction) Acting() string {
25	switch a {
26	case ActionEmpty:
27		return "emptying"
28	case ActionMoveToTrash:
29		return "moving to trash"
30	case ActionDelete:
31		return "deleting"
32	}
33	return "deleting"
34}