move hidden flag to trash command only
list, clean, and restore all always show hidden files
This commit is contained in:
parent
50a7d5aa56
commit
0113c56a5e
16
main.go
16
main.go
|
@ -115,7 +115,7 @@ var (
|
||||||
beforeCommands = func(ctx *cli.Context) (err error) {
|
beforeCommands = func(ctx *cli.Context) (err error) {
|
||||||
// setup filter
|
// setup filter
|
||||||
if f == nil {
|
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())
|
log.Debugf("filter: %s", f.String())
|
||||||
return
|
return
|
||||||
|
@ -363,13 +363,6 @@ var (
|
||||||
DisableDefaultText: true,
|
DisableDefaultText: true,
|
||||||
Destination: &do,
|
Destination: &do,
|
||||||
},
|
},
|
||||||
&cli.BoolFlag{
|
|
||||||
Name: "hidden",
|
|
||||||
Usage: "operate on hidden files",
|
|
||||||
Aliases: []string{"H"},
|
|
||||||
DisableDefaultText: true,
|
|
||||||
Destination: &sh,
|
|
||||||
},
|
|
||||||
}
|
}
|
||||||
|
|
||||||
trashFlags = []cli.Flag{
|
trashFlags = []cli.Flag{
|
||||||
|
@ -387,6 +380,13 @@ var (
|
||||||
Aliases: []string{"w"},
|
Aliases: []string{"w"},
|
||||||
Destination: &workdir,
|
Destination: &workdir,
|
||||||
},
|
},
|
||||||
|
&cli.BoolFlag{
|
||||||
|
Name: "hidden",
|
||||||
|
Usage: "operate on hidden files",
|
||||||
|
Aliases: []string{"H"},
|
||||||
|
DisableDefaultText: true,
|
||||||
|
Destination: &sh,
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
alreadyintrashFlags = []cli.Flag{
|
alreadyintrashFlags = []cli.Flag{
|
||||||
|
|
Loading…
Reference in a new issue