@aymanbagabas/drift 0.0.9 → 0.0.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +25 -0
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -104,6 +104,31 @@ the `drift` binary on your `PATH`.
104
104
 
105
105
  Every method installs a `drift` binary.
106
106
 
107
+ ### Shell completions
108
+
109
+ drift completes its flags and option values, paths after `--`, and git
110
+ revisions: refs, commit hashes, `HEAD~2` ancestors, `HEAD@{1}` reflog entries,
111
+ `@{upstream}`, `HEAD:src/` paths, and both ends of a range like
112
+ `main..feature`.
113
+
114
+ The Homebrew, deb, rpm, apk, AUR, and Nix packages set this up for bash, zsh,
115
+ and fish. Otherwise, add the line for your shell to its startup file:
116
+
117
+ ```sh
118
+ eval "$(drift --completions bash)" # bash: ~/.bashrc
119
+ source <(drift --completions zsh) # zsh: ~/.zshrc, after compinit
120
+ drift --completions fish | source # fish: ~/.config/fish/completions/drift.fish
121
+ ```
122
+
123
+ For PowerShell, add `drift --completions powershell | Out-String | Invoke-Expression`
124
+ to `$PROFILE`. For Elvish, add `eval (drift --completions elvish | slurp)` to
125
+ `rc.elv`.
126
+
127
+ zsh and fish treat an unmatched `{` as brace expansion, and PowerShell treats
128
+ it as the start of a script block. To complete a reflog entry in these shells,
129
+ quote the word (`'HEAD@{`). In zsh and fish, you can also escape the brace
130
+ (`HEAD@\{`).
131
+
107
132
  ## Use it
108
133
 
109
134
  ```sh
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aymanbagabas/drift",
3
- "version": "0.0.9",
3
+ "version": "0.0.10",
4
4
  "description": "A standalone git diff pager for the terminal.",
5
5
  "bin": {
6
6
  "drift": "bin/drift.js"