Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( // RulePath is a json path contining rules RulePath string // SnippetPath defines snippet root directry path SnippetPath string // LogPath is a path of the log file LogPath = os.ExpandEnv(defaultLogPath) // TagDelimiter defines delimiter string // that divide `tag` and one line of source TagDelimiter = "\\t" )
Functions ¶
func MeasureElapsedTime ¶ added in v0.4.0
MeasureElapsedTime measures elapsed time given a started time.
func Run ¶
Run runs the main process of pmy. It returns zsh statement, where resulting values will be passed into zsh variables.
func SetConfigs ¶
func SetConfigs()
SetConfigs set all Pmy config variable from shell's environment variables.
Types ¶
type CmdGroup ¶
type CmdGroup struct {
Tag string `json:"tag"`
Stmt string `json:"stmt"`
After string `json:"after"`
// contains filtered or unexported fields
}
CmdGroup represents one command creating sources for fzf
type CmdGroups ¶
type CmdGroups []*CmdGroup
CmdGroups is representing Slice of Cmd Resulting all commands will be one set of fzf-sources
type Out ¶ added in v0.2.0
type Out struct {
// contains filtered or unexported fields
}
Out represents Output of pmy against zsh routine. This struct has strings exported to shell, whose embedded variables are all expanded.
type Rule ¶ added in v0.2.0
type Rule struct {
Name string `json:"name" yaml:"name"`
Matcher string `json:"matcher" yaml:"matcher"`
Description string `json:"description" yaml:"description"`
RegexpLeft string `json:"regexpLeft" yaml:"regexp-left"`
RegexpRight string `json:"regexpRight" yaml:"regexp-right"`
CmdGroups CmdGroups `json:"cmdGroups" yaml:"cmd-groups"`
FuzzyFinderCmd string `json:"fuzzyFinderCmd" yaml:"fuzzy-finder-cmd"`
BufferLeft string `json:"bufferLeft" yaml:"buffer-left"`
BufferRight string `json:"bufferRight" yaml:"buffer-right"`
// contains filtered or unexported fields
}
Rule is a struct representing one rule
type RuleFile ¶ added in v0.2.0
RuleFile represents one Rule Json file information
func GetAllRuleFiles ¶ added in v0.2.0
func GetAllRuleFiles() []*RuleFile
GetAllRuleFiles get all files under $PMY_RULE_PATH configured by environment variable
type SnippetFile ¶ added in v0.2.0
SnippetFile represents one Snippet Json file information
func GetAllSnippetFiles ¶ added in v0.2.0
func GetAllSnippetFiles() []*SnippetFile
GetAllSnippetFiles get all pmy snippets txt paths configured by environment variable