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:
Lilian Jónsdóttir 2024-06-19 18:24:57 -07:00
parent 5467d7a549
commit 2f56ecf40b
3 changed files with 208 additions and 81 deletions

28
internal/modes/modes.go Normal file
View 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"
}
}