diff options
| author | ewy <ewy0@protonmail.com> | 2026-04-22 22:06:24 +0200 |
|---|---|---|
| committer | ewy <ewy0@protonmail.com> | 2026-04-22 22:06:24 +0200 |
| commit | 1e8cedca4d03829fadd532e9c5980dbb0eeab4bb (patch) | |
| tree | 90745c56ab9c3feec790ba001683a19f4e360eb8 /model/tags.go | |
| parent | d88661935fa2b6e2c0fe93345800113e1a71b451 (diff) | |
docs
Diffstat (limited to 'model/tags.go')
| -rw-r--r-- | model/tags.go | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/model/tags.go b/model/tags.go index 08cb135..a34f555 100644 --- a/model/tags.go +++ b/model/tags.go @@ -5,9 +5,11 @@ import ( "strings" ) +// Tag is some text which is contained in a filename which triggers pik functionality type Tag *string type TagAction func(src *Source) +// New creates a new tag and registers it in the subsystems func New(input string) Tag { result := &input TagMap[input] = result @@ -16,12 +18,19 @@ func New(input string) Tag { } var ( - Here = New("here") - Pre = New("pre") - Post = New("post") - Final = New("final") - Hidden = New("hidden") - Single = New("single") + // Here will force the target to run in the current directory instead of the source directory + Here = New("here") + // Pre turns the target into a trigger, causing it to be triggered before another target gets ran + Pre = New("pre") + // Post turns the target into a trigger, causing it to be triggered after another target gets ran and exits succesfully + Post = New("post") + // Final turns the target into a trigger, causing it to be triggered after another target gets ran + Final = New("final") + // Hidden means the target is not visible in the menu + Hidden = New("hidden") + // Single means this target will not use any triggers + Single = New("single") + // Override means this should be selected instead of a non-override target, if possible Override = New("override") ) |
