add interactive mode
when run with no args, interactive mode is launched files in trash are listed, select files, and use r/c to restore/clean them
This commit is contained in:
parent
5467d7a549
commit
2f56ecf40b
3 changed files with 208 additions and 81 deletions
28
internal/modes/modes.go
Normal file
28
internal/modes/modes.go
Normal file
|
@ -0,0 +1,28 @@
|
|||
package modes
|
||||
|
||||
type Mode int
|
||||
|
||||
const (
|
||||
Trashing Mode = iota + 1
|
||||
Listing
|
||||
Restoring
|
||||
Cleaning
|
||||
Interactive
|
||||
)
|
||||
|
||||
func (m Mode) String() string {
|
||||
switch m {
|
||||
case Trashing:
|
||||
return "Trashing"
|
||||
case Listing:
|
||||
return "Listing"
|
||||
case Restoring:
|
||||
return "Restoring"
|
||||
case Cleaning:
|
||||
return "Cleaning"
|
||||
case Interactive:
|
||||
return "Interactive"
|
||||
default:
|
||||
return "0"
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue