Skip to content

Commit a0644f1

Browse files
author
Hiroki Konishi
committed
Update: minor rules
1 parent 1ce7307 commit a0644f1

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

rules/git_pmy_rules.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151
"cmdGroups": [
5252
{
5353
"tag": "🌱:branch",
54-
"stmt": "git branch --format=\"%(refname:short)\" | grep feature/",
54+
"stmt": "git branch --format=\"%(refname:short)\" | egrep -v \"(master|develop|dev)\"",
5555
"after": "awk '{print $0}'"
5656
}
5757
],

rules/pmy_rules.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,23 +36,23 @@
3636
"regexpLeft": "^(?P<body>.*?)(?P<path>~{0,1}([0-9A-Za-z_\\-.]*/)+)(?P<query>[0-9A-Za-z_\\-.]*)$",
3737
"cmdGroups": [
3838
{
39-
"stmt": "command ls -AF -1 <path>",
39+
"stmt": "command ls -AF -1 <path> | rg --color always \"<query>\"",
4040
"after": "awk '{print $0}'"
4141
}
4242
],
43-
"fuzzyFinderCmd": "fzf -0 -1 --ansi -q \"^<query> \"",
43+
"fuzzyFinderCmd": "fzf -0 -1 --ansi",
4444
"bufferLeft": "<body><path>",
4545
"bufferRight": "[]"
4646
},
4747
{
4848
"regexpLeft": "^(?P<body>.*?) (?P<query>[0-9A-Za-z_\\-.]*)$",
4949
"cmdGroups": [
5050
{
51-
"stmt": "command ls -AF -1",
51+
"stmt": "command ls -AF -1 | rg --color always \"<query>\"",
5252
"after": "awk '{print $0}'"
5353
}
5454
],
55-
"fuzzyFinderCmd": "fzf -0 -1 --ansi -q \"^<query> \"",
55+
"fuzzyFinderCmd": "fzf -0 -1 --ansi",
5656
"bufferLeft": "<body> ",
5757
"bufferRight": "[]"
5858
}

src/core.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,12 +41,12 @@ func Run(cfgPath string, in Input) string {
4141
log.Fatal(err)
4242
}
4343

44+
// Load command specific rules from config file
4445
if cmdName := in.getCmdName(); cmdName != "" {
4546
cmdCfgPath := filepath.Join(
4647
filepath.Dir(cfgPath),
4748
fmt.Sprintf("%v_%v", cmdName, filepath.Base(cfgPath)),
4849
)
49-
// Load command specific rules from config file
5050
cmdRules, err := loadAllRules(cmdCfgPath)
5151
if err == nil {
5252
rules = append(cmdRules, rules...)

0 commit comments

Comments
 (0)