Prevent using several link filter flags at the same time

pull/6/head
Mickaël Menu 4 years ago
parent 5905688bd3
commit 044ccf3ad5
No known key found for this signature in database
GPG Key ID: 53D73664CD359895

@ -11,30 +11,31 @@ import (
// Filtering holds filtering options to select notes. // Filtering holds filtering options to select notes.
type Filtering struct { type Filtering struct {
Path []string `arg optional placeholder:"<glob>"` Path []string `arg optional placeholder:"<glob>"`
Match string `help:"Terms to search for in the notes" short:"m" placeholder:"<query>"`
Limit int `help:"Limit the number of results" short:"n" placeholder:"<count>"` Match string `short:"m" placeholder:"<query>" help:"Terms to search for in the notes"`
Created string `help:"Only the notes created on the given date" placeholder:"<date>"` Limit int `short:"n" placeholder:"<count>" help:"Limit the number of results"`
CreatedBefore string `help:"Only the notes created before the given date" placeholder:"<date>"` Created string ` placeholder:"<date>" help:"Only the notes created on the given date"`
CreatedAfter string `help:"Only the notes created after the given date" placeholder:"<date>"` CreatedBefore string ` placeholder:"<date>" help:"Only the notes created before the given date"`
Modified string `help:"Only the notes modified on the given date" placeholder:"<date>"` CreatedAfter string ` placeholder:"<date>" help:"Only the notes created after the given date"`
ModifiedBefore string `help:"Only the notes modified before the given date" placeholder:"<date>"` Modified string ` placeholder:"<date>" help:"Only the notes modified on the given date"`
ModifiedAfter string `help:"Only the notes modified after the given date" placeholder:"<date>"` ModifiedBefore string ` placeholder:"<date>" help:"Only the notes modified before the given date"`
LinkedBy []string `help:"Only the notes linked by the given notes" placeholder:"<path>" short:"l"` ModifiedAfter string ` placeholder:"<date>" help:"Only the notes modified after the given date"`
LinkingTo []string `help:"Only the notes linking to the given notes" placeholder:"<path>" short:"L"` Related []string ` help:"Only the notes which might be related to the given notes" xor:"link"`
NotLinkedBy []string `help:"Only the notes not linked by the given notes" placeholder:"<path>"` LinkedBy []string `short:"l" placeholder:"<path>" help:"Only the notes linked by the given notes" xor:"link"`
NotLinkingTo []string `help:"Only the notes not linking to the given notes" placeholder:"<path>"` LinkingTo []string `short:"L" placeholder:"<path>" help:"Only the notes linking to the given notes" xor:"link"`
MaxDistance int `help:"Maximum distance between two linked notes"` NotLinkedBy []string ` placeholder:"<path>" help:"Only the notes not linked by the given notes" xor:"link"`
Related []string `help:"Only the notes which might be related to the given notes"` NotLinkingTo []string ` placeholder:"<path>" help:"Only the notes not linking to the given notes" xor:"link"`
Orphan bool `help:"Only the notes which don't have any other note linking to them"` MaxDistance int ` help:"Maximum distance between two linked notes"`
Exclude []string `help:"Excludes notes matching the given file path pattern from the list" short:"x" placeholder:"<glob>"` Orphan bool ` help:"Only the notes which don't have any other note linking to them"`
Recursive bool `help:"Follow links recursively" short:"r"` Exclude []string `short:"x" placeholder:"<glob>" help:"Excludes notes matching the given file path pattern from the list"`
Interactive bool `help:"Further filter the list of notes interactively" short:"i"` Recursive bool `short:"r" help:"Follow links recursively"`
Interactive bool `short:"i" help:"Further filter the list of notes interactively"`
} }
// Sorting holds sorting options to order notes. // Sorting holds sorting options to order notes.
type Sorting struct { type Sorting struct {
Sort []string `help:"Sort the notes by the given criterion" short:"s" placeholder:"<term>"` Sort []string `short:"s" placeholder:"<term>" help:"Sort the notes by the given criterion"`
} }
// NewFinderOpts creates an instance of note.FinderOpts from a set of user flags. // NewFinderOpts creates an instance of note.FinderOpts from a set of user flags.

Loading…
Cancel
Save