diff options
| author | typebrook <typebrook@gmail.com> | 2020-05-12 11:46:24 +0800 |
|---|---|---|
| committer | typebrook <typebrook@gmail.com> | 2020-05-12 11:46:24 +0800 |
| commit | 607707bafe186b1edc0e13502e8cae49954c2046 (patch) | |
| tree | a3ae3ef2b3c37a628420c3bac98cd6b0d147aa25 /README.md | |
| parent | 462163a864b8d963ff5c2773426b2541dacd7b8d (diff) | |
Update README
Diffstat (limited to 'README.md')
| -rw-r--r-- | README.md | 24 |
1 files changed, 16 insertions, 8 deletions
| @@ -18,7 +18,7 @@ Use it to boost your coding workflow. | |||
| 18 | - [Filter by pattern](#Filter-by-pattern) | 18 | - [Filter by pattern](#Filter-by-pattern) |
| 19 | - [Tips](#Tips) | 19 | - [Tips](#Tips) |
| 20 | - [Filter gists with pipe](#Filter-gists-with-pipe) | 20 | - [Filter gists with pipe](#Filter-gists-with-pipe) |
| 21 | - [Git Branching](#Git-Branching) | 21 | - [Git Workflow](#Git-Workflow) |
| 22 | - [Useful action for gist repo](#Useful-action-for-gist-repo) | 22 | - [Useful action for gist repo](#Useful-action-for-gist-repo) |
| 23 | - [Suppress action](#Suppress-action) | 23 | - [Suppress action](#Suppress-action) |
| 24 | - [Suppress hint](#Suppress-hint) | 24 | - [Suppress hint](#Suppress-hint) |
| @@ -159,7 +159,7 @@ If action is not being set, then a default action will be performed: | |||
| 159 | ${SHELL:-bash} | 159 | ${SHELL:-bash} |
| 160 | ``` | 160 | ``` |
| 161 | 161 | ||
| 162 | Also, if you run `gist <INDEX>` with `--no-action`, then action would be ignored. | 162 | Also, if you run `gist <INDEX>` with `--no-action`(or `-n`), then action would be ignored. |
| 163 | 163 | ||
| 164 | ### EDITOR | 164 | ### EDITOR |
| 165 | **[Optional]** Editor to open `~/.config/gist.conf`. Default to be `vi` . | 165 | **[Optional]** Editor to open `~/.config/gist.conf`. Default to be `vi` . |
| @@ -256,7 +256,7 @@ gist lan | |||
| 256 | #### Filter gists with languages | 256 | #### Filter gists with languages |
| 257 | ```bash | 257 | ```bash |
| 258 | # Filter gists with files in Shell and Yaml format | 258 | # Filter gists with files in Shell and Yaml format |
| 259 | gist lan | 259 | gist lan LANGUAGE1 LANGUAGE2... |
| 260 | ``` | 260 | ``` |
| 261 |  | 261 |  |
| 262 | 262 | ||
| @@ -282,12 +282,18 @@ If `STDIN` is from a pipe, then `gist` will only process gists with **indices in | |||
| 282 | seq 20 | gist | 282 | seq 20 | gist |
| 283 | # List starred gist with Yaml file | 283 | # List starred gist with Yaml file |
| 284 | gist star | gist lan Yaml | 284 | gist star | gist lan Yaml |
| 285 | # Only List gists with tag1, pattern1 in description/filenames/contents and markdown file | 285 | # Only List gists with tag1, pattern1 in description/filenames/contents and contains shell script |
| 286 | gist tag tag1 | gist grep pattern1 | gist lan SHELL | 286 | gist tag tag1 | gist grep pattern1 | gist lan SHELL |
| 287 | ``` | 287 | ``` |
| 288 | 288 | ||
| 289 | ### Git Branching | 289 | ### Git Workflow |
| 290 | Each gist is a git repository. Although there are some limits on `git push`, like sub-directory. But guess what? Push another branch to `github.com` is allowed. So why not use this feature for your gist workflow? | 290 | Each gist is a git repository. |
| 291 | Although there are some limits on `git push`, like sub-directory is prohibited. But guess what? | ||
| 292 | 1. Push another branch to `github.com` is allowed. | ||
| 293 | 2. Push tags is also allowed. And like repos in `github.com`, you can get source file by tag with URL: | ||
| 294 | ``` | ||
| 295 | https://codeload.github.com/gist/<gist_id>/tar.gz/<tag_name> | ||
| 296 | ``` | ||
| 291 | 297 | ||
| 292 | ### Useful action for gist repo | 298 | ### Useful action for gist repo |
| 293 | I strongly recommend using [`tig`](https://github.com/jonas/tig) as your custom [action](#action). It is the most powerful git CLI tool as far as I know, and also easy to get in most of the Linux distros or Homebrew for mac. Give it a try! | 299 | I strongly recommend using [`tig`](https://github.com/jonas/tig) as your custom [action](#action). It is the most powerful git CLI tool as far as I know, and also easy to get in most of the Linux distros or Homebrew for mac. Give it a try! |
| @@ -313,9 +319,11 @@ There are several environment variables or arguments can suppress hint or user c | |||
| 313 | # List gists without hint | 319 | # List gists without hint |
| 314 | hint=false gist | 320 | hint=false gist |
| 315 | 321 | ||
| 316 | # just print the repo path with a given index | 322 | # Just print the repo path with a given index |
| 317 | gist 3 --no-action | 323 | gist 3 --no-action |
| 324 | # Or shorter argument | ||
| 325 | gist 3 -n | ||
| 318 | 326 | ||
| 319 | # delete your third gist without confirmation | 327 | # Delete your third gist without confirmation |
| 320 | gist delete 3 --force | 328 | gist delete 3 --force |
| 321 | ``` | 329 | ``` |