From 607707bafe186b1edc0e13502e8cae49954c2046 Mon Sep 17 00:00:00 2001 From: typebrook Date: Tue, 12 May 2020 11:46:24 +0800 Subject: Update README --- README.md | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) (limited to 'README.md') diff --git a/README.md b/README.md index e759d66..788882b 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,7 @@ Use it to boost your coding workflow. - [Filter by pattern](#Filter-by-pattern) - [Tips](#Tips) - [Filter gists with pipe](#Filter-gists-with-pipe) - - [Git Branching](#Git-Branching) + - [Git Workflow](#Git-Workflow) - [Useful action for gist repo](#Useful-action-for-gist-repo) - [Suppress action](#Suppress-action) - [Suppress hint](#Suppress-hint) @@ -159,7 +159,7 @@ If action is not being set, then a default action will be performed: ${SHELL:-bash} ``` -Also, if you run `gist ` with `--no-action`, then action would be ignored. +Also, if you run `gist ` with `--no-action`(or `-n`), then action would be ignored. ### EDITOR **[Optional]** Editor to open `~/.config/gist.conf`. Default to be `vi` . @@ -256,7 +256,7 @@ gist lan #### Filter gists with languages ```bash # Filter gists with files in Shell and Yaml format -gist lan +gist lan LANGUAGE1 LANGUAGE2... ``` ![](https://i.imgur.com/tKI5KND.png) @@ -282,12 +282,18 @@ If `STDIN` is from a pipe, then `gist` will only process gists with **indices in seq 20 | gist # List starred gist with Yaml file gist star | gist lan Yaml -# Only List gists with tag1, pattern1 in description/filenames/contents and markdown file +# Only List gists with tag1, pattern1 in description/filenames/contents and contains shell script gist tag tag1 | gist grep pattern1 | gist lan SHELL ``` -### Git Branching -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? +### Git Workflow +Each gist is a git repository. +Although there are some limits on `git push`, like sub-directory is prohibited. But guess what? +1. Push another branch to `github.com` is allowed. +2. Push tags is also allowed. And like repos in `github.com`, you can get source file by tag with URL: + ``` + https://codeload.github.com/gist//tar.gz/ + ``` ### Useful action for gist repo 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 # List gists without hint hint=false gist -# just print the repo path with a given index +# Just print the repo path with a given index gist 3 --no-action +# Or shorter argument +gist 3 -n -# delete your third gist without confirmation +# Delete your third gist without confirmation gist delete 3 --force ``` -- cgit v1.2.3-70-g09d2