History

completion: improve docs for activation

It was not clear if users should activate both sets of completions if they wanted the dynamic ones. The shell commands for activating the dynamic completions are aligned with the static version. Users can choose / are responsible themselves to add the activation to their shell config if they want them in every shell instance. For fish specifically, `script | source` is more idiomatic than `source (script | psub)`.

Remo Senekowitsch committed 2 years ago

Commit a650af31 parent 8292d011 file · +10 −9Browse files

Unified · Split

docs/install-and-setup.md+10−9
@@ -210,12 +210,13 @@ To set up command-line completion, source the output of · 209 unmodified lines
210`jj util completion bash/zsh/fish`. Exactly how to source it210`jj util completion bash/zsh/fish`. Exactly how to source it
211depends on your shell.211depends on your shell.
212 212
213Improved completions are currently in the works, these will complete things213Improved completions are currently in the works, these will complete things like
214like bookmark names as well. You can activate them with the alternative "dynamic"214bookmark names as well. You can activate them with the alternative "dynamic"
215instructions below. Please let us know if you encounter any issues, so we can215instructions below. They should still complete everything the static completions
216ensure a smooth transition once we default to these new completions. If you216did, so only activate one of them. Please let us know if you encounter any
217have ideas about specific completions that could be added, please share them217issues, so we can ensure a smooth transition once we default to these new
218[here](https://github.com/martinvonz/jj/issues/4763).218completions. If you have ideas about specific completions that could be added,
219please share them [here](https://github.com/martinvonz/jj/issues/4763).
219 220
220### Bash221### Bash
221 222
@@ -226,7 +227,7 @@ source <(jj util completion bash) · 4 unmodified lines
226dynamic:227dynamic:
227 228
228```shell229```shell
229echo "source <(COMPLETE=bash jj)" >> ~/.bashrc230source <(COMPLETE=bash jj)
230```231```
231 232
232### Zsh233### Zsh
@@ -240,7 +241,7 @@ source <(jj util completion zsh) · 7 unmodified lines
240dynamic:241dynamic:
241 242
242```shell243```shell
243echo "source <(COMPLETE=zsh jj)" >> ~/.zshrc244source <(COMPLETE=zsh jj)
244```245```
245 246
246### Fish247### Fish
@@ -252,7 +253,7 @@ jj util completion fish | source · 5 unmodified lines
252dynamic:253dynamic:
253 254
254```shell255```shell
255echo "source (COMPLETE=fish jj | psub)" >> ~/.config/fish/config.fish256COMPLETE=fish jj | source
256```257```
257 258
258### Nushell259### Nushell