move hidden flag to trash command only

list, clean, and restore all always show hidden files
This commit is contained in:
Lilian Jónsdóttir 2024-06-30 17:48:12 -07:00
parent 50a7d5aa56
commit 0113c56a5e

16
main.go
View file

@ -115,7 +115,7 @@ var (
beforeCommands = func(ctx *cli.Context) (err error) {
// setup filter
if f == nil {
f, err = filter.New(o, b, a, g, p, ung, unp, fo, do, sh, ctx.Args().Slice()...)
f, err = filter.New(o, b, a, g, p, ung, unp, fo, do, true, ctx.Args().Slice()...)
}
log.Debugf("filter: %s", f.String())
return
@ -363,13 +363,6 @@ var (
DisableDefaultText: true,
Destination: &do,
},
&cli.BoolFlag{
Name: "hidden",
Usage: "operate on hidden files",
Aliases: []string{"H"},
DisableDefaultText: true,
Destination: &sh,
},
}
trashFlags = []cli.Flag{
@ -387,6 +380,13 @@ var (
Aliases: []string{"w"},
Destination: &workdir,
},
&cli.BoolFlag{
Name: "hidden",
Usage: "operate on hidden files",
Aliases: []string{"H"},
DisableDefaultText: true,
Destination: &sh,
},
}
alreadyintrashFlags = []cli.Flag{