Skip to content

Commit

Permalink
keep agou prefix mandatory as minus interferes with flags
Browse files Browse the repository at this point in the history
  • Loading branch information
rsteube committed Apr 14, 2021
1 parent 2e09949 commit 16a7b3b
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions pkg/actions/fs/fs.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,12 +84,15 @@ func ActionFileModesSymbolic() carapace.Action {
"a", "all",
).Invoke(c)

operators := carapace.ActionValuesDescribed(
"+", "adds the specified modes to the specified classes",
"-", "removes the specified modes from the specified classes",
"=", "the modes specified are to be made the exact modes for the specified classes",
).Invoke(c)
return classes.Merge(operators).Filter(c.Parts).ToA()
if len(c.Parts) > 0 {
operators := carapace.ActionValuesDescribed(
"+", "adds the specified modes to the specified classes",
"-", "removes the specified modes from the specified classes",
"=", "the modes specified are to be made the exact modes for the specified classes",
).Invoke(c)
return classes.Merge(operators).Filter(c.Parts).ToA()
}
return classes.Filter(c.Parts).ToA()
} else {
return carapace.ActionValuesDescribed(
"r", "read",
Expand Down

0 comments on commit 16a7b3b

Please sign in to comment.