Skip to content

Commit 6910a07

Browse files
relastleHiroki-Konishi
authored andcommitted
Update: readme
1 parent 8b37118 commit 6910a07

File tree

2 files changed

+49
-1
lines changed

2 files changed

+49
-1
lines changed

.circleci/config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ workflows:
4747
branches:
4848
only: # only branches matching the below regex filters will run
4949
- master
50-
- develop
50+
# - develop
5151
- integration-test:
5252
requires: # buildが成功したら実行する
5353
- build

README.md

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,46 @@ eval "$(pmy init)"
3030

3131
You can also add the line into your ~/.zshrc if you want.
3232

33+
## Quick Start
34+
35+
Try downloading very simple pmy rule files into `$HOME/.pmy` (where pmy searches for rules by default).
36+
37+
```zsh
38+
git clone https://github.com/relastle/pmy-config $HOME/.pmy
39+
```
40+
41+
Then, you are already able to enjoy path completion using fuzzy finder.
42+
43+
[Sample GIF](https://user-images.githubusercontent.com/6816040/67203963-6d975380-f447-11e9-8198-0f62b7e127ed.gif)
44+
45+
This path-completion befavior is realized by simple yml configurations below
46+
47+
```yml
48+
- regexp-left: ^(?P<body>.*?)(?P<path>~{0,1}([0-9A-Za-z_\-.]*/)+)(?P<query>[0-9A-Za-z_\-.]*)$
49+
cmd-groups:
50+
- stmt: \ls -AlFG --color=always <path> | tail -n +2 | grep --color=always "<query>"
51+
after: awk '{print $8}'
52+
fuzzy-finder-cmd: fzf -0 -1 --ansi -n8
53+
buffer-left: <body><path>
54+
buffer-right: '[]'
55+
56+
- regexp-left: ^(?P<body>.*?) (?P<query>[0-9A-Za-z_\-.]*)$
57+
cmd-groups:
58+
- stmt: \ls -AlFG --color=always | tail -n +2 | grep --color=always "<query>"
59+
after: awk '{print $8}'
60+
fuzzy-finder-cmd: fzf -0 -1 --ansi -n8
61+
buffer-left: '<body> '
62+
buffer-right: '[]'
63+
```
64+
65+
Customization is very easy.
66+
67+
- Wrtie your own rule in JSON/YML format.
68+
- Save it in the name of `pmy_rules.[json|yml]`
69+
- Locate the file under one of `$PMY_RULE_PATH`.
70+
71+
If you want to investigate into further examples, see [Gallery](https://github.com/relastle/pmy/wiki/Gallery).
72+
3373
## Basic Usage
3474

3575
Pmy can be invoked by <kbd>Ctrl</kbd> + <kbd>Space</kbd>.
@@ -125,6 +165,14 @@ If you want to change these values, you should export them in .zshrc before you
125165
eval "$(pmy init)"
126166
```
127167

168+
## Features
169+
170+
- [!] JSON/YML rule-configurations.
171+
- [!] Customize fuzzy finder command used.
172+
- [!] Combining multiple command into one source.
173+
- [ ] Caching compiled regular expression.
174+
- [ ] Customizing priority of rules.
175+
128176
## Demonstration
129177

130178
Here, some of examples of pmy's completion are provided as GIF with its rule(json format).

0 commit comments

Comments
 (0)