aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authortypebrook <typebrook@gmail.com>2020-03-17 10:10:23 +0800
committertypebrook <typebrook@gmail.com>2020-03-17 15:43:35 +0800
commitccf58020586f920fdc093f68599c754e96a976ef (patch)
treeee69761db2a6e1eec1ce1a88d51d28da8cc79fc5
parentf2fd34a565808d3d5f0ea714b2a1a3cca3135cfa (diff)
Update README
-rw-r--r--README.md25
1 files changed, 24 insertions, 1 deletions
diff --git a/README.md b/README.md
index 0d18f57..fa2b7f3 100644
--- a/README.md
+++ b/README.md
@@ -134,8 +134,11 @@ valid values are:
134For example, use `gist config protocol ssh` to use SSH protocol instead. 134For example, use `gist config protocol ssh` to use SSH protocol instead.
135 135
136## Tips 136## Tips
137### Git Branching
138Each 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?
139
137### Jump to gist repo 140### Jump to gist repo
138Sometimes you want to switch to the specified gist repo as working directory. 141Sometimes you want to switch to the gist repo as working directory with given index.
139But since `gist` is a bash script which goes in subshell, if you want to achieve this, it is necessary to configure shell setting by yourself. 142But since `gist` is a bash script which goes in subshell, if you want to achieve this, it is necessary to configure shell setting by yourself.
140 143
141`gist <index-of-gist>` will return the path of repo, so you can put the following function into your `~/.bashrc` or `~/.zshrc` to apply it. 144`gist <index-of-gist>` will return the path of repo, so you can put the following function into your `~/.bashrc` or `~/.zshrc` to apply it.
@@ -147,6 +150,26 @@ But since `gist` is a bash script which goes in subshell, if you want to achieve
147 ``` 150 ```
148 And run `cdgist 3` to jump to the repo of your third gist. 151 And run `cdgist 3` to jump to the repo of your third gist.
149 152
153### Suppress hint
154If [action](#action) is not configured, there is always a hint to show how to configure it. The following command can suppress it with a simple action that does nothing.
155```
156gist config action 'true'
157```
158
159There are serveral environment variables can suppress hint or user confirm, like:
160```
161# show list without hint
162hint=false gist
163
164# just print the repo path with a given index
165gist 3 --no-action
166
167# delete your third gist without confirmation
168confirm=false gist delete 3
169```
170
171
172
150### Useful action for gist repo 173### Useful action for gist repo
151I strongly recommend using [`tig`](https://github.com/jonas/tig) as [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! 174I strongly recommend using [`tig`](https://github.com/jonas/tig) as [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!
152 175