feat: added completions for aliases
b3a7435 parent: fa7efad modified
README.md +33 -12 | @@ -12,26 +12,47 @@ fisher install anthodev/jj.fish | ||
| 12 | 12 | |
| 13 | 13 | ## Aliases |
| 14 | 14 | |
| 15 | +### Changes | |
| 16 | + | |
| 15 | 17 | | Alias | Command | Description | |
| 16 | 18 | |-------|---------|-------------| |
| 17 | -| `jjn [arg]` | `jj new [arg]` | Create new change (optional arg) | | |
| 19 | +| `jjn [arg]` | `jj new [arg]` | Create new change | | |
| 18 | 20 | | `jjnd` | `jj new develop` | Create new change on develop | |
| 19 | 21 | | `jjnm` | `jj new main` | Create new change on main | |
| 20 | -| `jje <arg>` | `jj edit <arg>` | Edit a change (required arg) | | |
| 22 | +| `jje <arg>` | `jj edit <arg>` | Edit a change | | |
| 21 | 23 | | `jjs` | `jj status` | Show status | |
| 22 | -| `jjf <arg>` | `jj log \| grep <arg>` | Search in log (required arg) | | |
| 23 | -| `jjdm <arg>` | `jj describe -m <arg>` | Describe change with message (required arg) | | |
| 24 | +| `jjf <arg>` | `jj log \| grep <arg>` | Search in log | | |
| 25 | +| `jjdm <arg>` | `jj describe -m <arg>` | Describe change with message | | |
| 24 | 26 | | `jjr` | `jj resolve` | Resolve conflicts | |
| 25 | -| `jjrd` | `jj rebase -d develop` | Rebase onto develop | | |
| 26 | -| `jjrb <arg>` | `jj rebase -s <arg>` | Rebase from source (required arg) | | |
| 27 | -| `jjrbd <arg>` | `jj rebase -s <arg> -d develop` | Rebase from source onto develop (required arg) | | |
| 28 | -| `jja <arg>` | `jj abandon <arg>` | Abandon a change (required arg) | | |
| 27 | +| `jja <arg>` | `jj abandon <arg>` | Abandon a change | | |
| 29 | 28 | | `jjh` | `jj edit 'heads(@::)'` | Edit head of working copy | |
| 29 | + | |
| 30 | +### Rebase | |
| 31 | + | |
| 32 | +| Alias | Command | Description | | |
| 33 | +|-------|---------|-------------| | |
| 34 | +| `jjrd` | `jj rebase -d develop` | Rebase onto develop | | |
| 35 | +| `jjrb <arg>` | `jj rebase -s <arg>` | Rebase from source | | |
| 36 | +| `jjrbd <arg>` | `jj rebase -s <arg> -d develop` | Rebase from source onto develop | | |
| 37 | + | |
| 38 | +### Git | |
| 39 | + | |
| 40 | +| Alias | Command | Description | | |
| 41 | +|-------|---------|-------------| | |
| 30 | 42 | | `jjgf` | `jj git fetch` | Git fetch | |
| 31 | 43 | | `jjgp` | `jj git push` | Git push | |
| 44 | + | |
| 45 | +### Bookmarks | |
| 46 | + | |
| 47 | +| Alias | Command | Description | | |
| 48 | +|-------|---------|-------------| | |
| 32 | 49 | | `jjba` | `jj bookmark advance` | Advance bookmark | |
| 33 | -| `jjbc <arg>` | `jj bookmark create <arg>` | Create bookmark (required arg) | | |
| 34 | -| `jjbt <arg>` | `jj bookmark track <arg>` | Track bookmark (required arg) | | |
| 35 | -| `jjbu <arg>` | `jj bookmark untrack <arg>` | Untrack bookmark (required arg) | | |
| 36 | -| `jjbf <arg>` | `jj bookmark forget <arg>` | Forget bookmark (required arg) | | |
| 50 | +| `jjbc <arg>` | `jj bookmark create <arg>` | Create a bookmark | | |
| 51 | +| `jjbt <arg>` | `jj bookmark track <arg>` | Track a bookmark | | |
| 52 | +| `jjbu <arg>` | `jj bookmark untrack <arg>` | Untrack a bookmark | | |
| 53 | +| `jjbf <arg>` | `jj bookmark forget <arg>` | Forget a bookmark | | |
| 37 | 54 | | `jjbl` | `jj bookmark list` | List bookmarks | |
| 55 | + | |
| 56 | +## Completions | |
| 57 | + | |
| 58 | +All aliases have tab completions with descriptions. Commands with revision or bookmark arguments provide dynamic completions. | |
| @@ -12,26 +12,47 @@ fisher install anthodev/jj.fish | |||
| 12 | 12 | ||
| 13 | ## Aliases | 13 | ## Aliases |
| 14 | 14 | ||
| 15 | +### Changes | ||
| 16 | + | ||
| 15 | | Alias | Command | Description | | 17 | | Alias | Command | Description | |
| 16 | |-------|---------|-------------| | 18 | |-------|---------|-------------| |
| 17 | -| `jjn [arg]` | `jj new [arg]` | Create new change (optional arg) | | 19 | +| `jjn [arg]` | `jj new [arg]` | Create new change | |
| 18 | | `jjnd` | `jj new develop` | Create new change on develop | | 20 | | `jjnd` | `jj new develop` | Create new change on develop | |
| 19 | | `jjnm` | `jj new main` | Create new change on main | | 21 | | `jjnm` | `jj new main` | Create new change on main | |
| 20 | -| `jje <arg>` | `jj edit <arg>` | Edit a change (required arg) | | 22 | +| `jje <arg>` | `jj edit <arg>` | Edit a change | |
| 21 | | `jjs` | `jj status` | Show status | | 23 | | `jjs` | `jj status` | Show status | |
| 22 | -| `jjf <arg>` | `jj log \| grep <arg>` | Search in log (required arg) | | 24 | +| `jjf <arg>` | `jj log \| grep <arg>` | Search in log | |
| 23 | -| `jjdm <arg>` | `jj describe -m <arg>` | Describe change with message (required arg) | | 25 | +| `jjdm <arg>` | `jj describe -m <arg>` | Describe change with message | |
| 24 | | `jjr` | `jj resolve` | Resolve conflicts | | 26 | | `jjr` | `jj resolve` | Resolve conflicts | |
| 25 | -| `jjrd` | `jj rebase -d develop` | Rebase onto develop | | 27 | +| `jja <arg>` | `jj abandon <arg>` | Abandon a change | |
| 26 | -| `jjrb <arg>` | `jj rebase -s <arg>` | Rebase from source (required arg) | | ||
| 27 | -| `jjrbd <arg>` | `jj rebase -s <arg> -d develop` | Rebase from source onto develop (required arg) | | ||
| 28 | -| `jja <arg>` | `jj abandon <arg>` | Abandon a change (required arg) | | ||
| 29 | | `jjh` | `jj edit 'heads(@::)'` | Edit head of working copy | | 28 | | `jjh` | `jj edit 'heads(@::)'` | Edit head of working copy | |
| 29 | + | ||
| 30 | +### Rebase | ||
| 31 | + | ||
| 32 | +| Alias | Command | Description | | ||
| 33 | +|-------|---------|-------------| | ||
| 34 | +| `jjrd` | `jj rebase -d develop` | Rebase onto develop | | ||
| 35 | +| `jjrb <arg>` | `jj rebase -s <arg>` | Rebase from source | | ||
| 36 | +| `jjrbd <arg>` | `jj rebase -s <arg> -d develop` | Rebase from source onto develop | | ||
| 37 | + | ||
| 38 | +### Git | ||
| 39 | + | ||
| 40 | +| Alias | Command | Description | | ||
| 41 | +|-------|---------|-------------| | ||
| 30 | | `jjgf` | `jj git fetch` | Git fetch | | 42 | | `jjgf` | `jj git fetch` | Git fetch | |
| 31 | | `jjgp` | `jj git push` | Git push | | 43 | | `jjgp` | `jj git push` | Git push | |
| 44 | + | ||
| 45 | +### Bookmarks | ||
| 46 | + | ||
| 47 | +| Alias | Command | Description | | ||
| 48 | +|-------|---------|-------------| | ||
| 32 | | `jjba` | `jj bookmark advance` | Advance bookmark | | 49 | | `jjba` | `jj bookmark advance` | Advance bookmark | |
| 33 | -| `jjbc <arg>` | `jj bookmark create <arg>` | Create bookmark (required arg) | | 50 | +| `jjbc <arg>` | `jj bookmark create <arg>` | Create a bookmark | |
| 34 | -| `jjbt <arg>` | `jj bookmark track <arg>` | Track bookmark (required arg) | | 51 | +| `jjbt <arg>` | `jj bookmark track <arg>` | Track a bookmark | |
| 35 | -| `jjbu <arg>` | `jj bookmark untrack <arg>` | Untrack bookmark (required arg) | | 52 | +| `jjbu <arg>` | `jj bookmark untrack <arg>` | Untrack a bookmark | |
| 36 | -| `jjbf <arg>` | `jj bookmark forget <arg>` | Forget bookmark (required arg) | | 53 | +| `jjbf <arg>` | `jj bookmark forget <arg>` | Forget a bookmark | |
| 37 | | `jjbl` | `jj bookmark list` | List bookmarks | | 54 | | `jjbl` | `jj bookmark list` | List bookmarks | |
| 55 | + | ||
| 56 | +## Completions | ||
| 57 | + | ||
| 58 | +All aliases have tab completions with descriptions. Commands with revision or bookmark arguments provide dynamic completions. | ||
added
completions/jja.fish +1 -0 | new file mode 100644 | ||
| @@ -0,0 +1 @@ | ||
| 1 | +complete --command jja --exclusive --arguments '(jj log --no-pager -T "change_id.short() ++ \"\n\"" 2>/dev/null)' --description "Abandon a change" | |
| new file mode 100644 | |||
| @@ -0,0 +1 @@ | |||
| 1 | +complete --command jja --exclusive --arguments '(jj log --no-pager -T "change_id.short() ++ \"\n\"" 2>/dev/null)' --description "Abandon a change" | ||
added
completions/jjba.fish +1 -0 | new file mode 100644 | ||
| @@ -0,0 +1 @@ | ||
| 1 | +complete --command jjba --description "Advance bookmark" | |
| new file mode 100644 | |||
| @@ -0,0 +1 @@ | |||
| 1 | +complete --command jjba --description "Advance bookmark" | ||
added
completions/jjbc.fish +1 -0 | new file mode 100644 | ||
| @@ -0,0 +1 @@ | ||
| 1 | +complete --command jjbc --description "Create a bookmark" | |
| new file mode 100644 | |||
| @@ -0,0 +1 @@ | |||
| 1 | +complete --command jjbc --description "Create a bookmark" | ||
added
completions/jjbf.fish +1 -0 | new file mode 100644 | ||
| @@ -0,0 +1 @@ | ||
| 1 | +complete --command jjbf --exclusive --arguments '(jj bookmark list --no-pager -T "name ++ \"\n\"" 2>/dev/null)' --description "Forget a bookmark" | |
| new file mode 100644 | |||
| @@ -0,0 +1 @@ | |||
| 1 | +complete --command jjbf --exclusive --arguments '(jj bookmark list --no-pager -T "name ++ \"\n\"" 2>/dev/null)' --description "Forget a bookmark" | ||
added
completions/jjbl.fish +1 -0 | new file mode 100644 | ||
| @@ -0,0 +1 @@ | ||
| 1 | +complete --command jjbl --description "List bookmarks" | |
| new file mode 100644 | |||
| @@ -0,0 +1 @@ | |||
| 1 | +complete --command jjbl --description "List bookmarks" | ||
added
completions/jjbt.fish +1 -0 | new file mode 100644 | ||
| @@ -0,0 +1 @@ | ||
| 1 | +complete --command jjbt --exclusive --arguments '(jj bookmark list --no-pager -T "name ++ \"\n\"" 2>/dev/null)' --description "Track a bookmark" | |
| new file mode 100644 | |||
| @@ -0,0 +1 @@ | |||
| 1 | +complete --command jjbt --exclusive --arguments '(jj bookmark list --no-pager -T "name ++ \"\n\"" 2>/dev/null)' --description "Track a bookmark" | ||
added
completions/jjbu.fish +1 -0 | new file mode 100644 | ||
| @@ -0,0 +1 @@ | ||
| 1 | +complete --command jjbu --exclusive --arguments '(jj bookmark list --no-pager -T "name ++ \"\n\"" 2>/dev/null)' --description "Untrack a bookmark" | |
| new file mode 100644 | |||
| @@ -0,0 +1 @@ | |||
| 1 | +complete --command jjbu --exclusive --arguments '(jj bookmark list --no-pager -T "name ++ \"\n\"" 2>/dev/null)' --description "Untrack a bookmark" | ||
added
completions/jjdm.fish +1 -0 | new file mode 100644 | ||
| @@ -0,0 +1 @@ | ||
| 1 | +complete --command jjdm --description "Describe change with message" | |
| new file mode 100644 | |||
| @@ -0,0 +1 @@ | |||
| 1 | +complete --command jjdm --description "Describe change with message" | ||
added
completions/jje.fish +1 -0 | new file mode 100644 | ||
| @@ -0,0 +1 @@ | ||
| 1 | +complete --command jje --exclusive --arguments '(jj log --no-pager -T "change_id.short() ++ \"\n\"" 2>/dev/null)' --description "Edit a change" | |
| new file mode 100644 | |||
| @@ -0,0 +1 @@ | |||
| 1 | +complete --command jje --exclusive --arguments '(jj log --no-pager -T "change_id.short() ++ \"\n\"" 2>/dev/null)' --description "Edit a change" | ||
added
completions/jjf.fish +1 -0 | new file mode 100644 | ||
| @@ -0,0 +1 @@ | ||
| 1 | +complete --command jjf --description "Search in log" | |
| new file mode 100644 | |||
| @@ -0,0 +1 @@ | |||
| 1 | +complete --command jjf --description "Search in log" | ||
added
completions/jjgf.fish +1 -0 | new file mode 100644 | ||
| @@ -0,0 +1 @@ | ||
| 1 | +complete --command jjgf --description "Git fetch" | |
| new file mode 100644 | |||
| @@ -0,0 +1 @@ | |||
| 1 | +complete --command jjgf --description "Git fetch" | ||
added
completions/jjgp.fish +1 -0 | new file mode 100644 | ||
| @@ -0,0 +1 @@ | ||
| 1 | +complete --command jjgp --description "Git push" | |
| new file mode 100644 | |||
| @@ -0,0 +1 @@ | |||
| 1 | +complete --command jjgp --description "Git push" | ||
added
completions/jjh.fish +1 -0 | new file mode 100644 | ||
| @@ -0,0 +1 @@ | ||
| 1 | +complete --command jjh --description "Edit head of working copy" | |
| new file mode 100644 | |||
| @@ -0,0 +1 @@ | |||
| 1 | +complete --command jjh --description "Edit head of working copy" | ||
added
completions/jjn.fish +1 -0 | new file mode 100644 | ||
| @@ -0,0 +1 @@ | ||
| 1 | +complete --command jjn --exclusive --arguments '(jj log --no-pager -T "change_id.short() ++ \"\n\"" 2>/dev/null)' --description "Create new change" | |
| new file mode 100644 | |||
| @@ -0,0 +1 @@ | |||
| 1 | +complete --command jjn --exclusive --arguments '(jj log --no-pager -T "change_id.short() ++ \"\n\"" 2>/dev/null)' --description "Create new change" | ||
added
completions/jjnd.fish +1 -0 | new file mode 100644 | ||
| @@ -0,0 +1 @@ | ||
| 1 | +complete --command jjnd --description "Create new change on develop" | |
| new file mode 100644 | |||
| @@ -0,0 +1 @@ | |||
| 1 | +complete --command jjnd --description "Create new change on develop" | ||
added
completions/jjnm.fish +1 -0 | new file mode 100644 | ||
| @@ -0,0 +1 @@ | ||
| 1 | +complete --command jjnm --description "Create new change on main" | |
| new file mode 100644 | |||
| @@ -0,0 +1 @@ | |||
| 1 | +complete --command jjnm --description "Create new change on main" | ||
added
completions/jjr.fish +1 -0 | new file mode 100644 | ||
| @@ -0,0 +1 @@ | ||
| 1 | +complete --command jjr --description "Resolve conflicts" | |
| new file mode 100644 | |||
| @@ -0,0 +1 @@ | |||
| 1 | +complete --command jjr --description "Resolve conflicts" | ||
added
completions/jjrb.fish +1 -0 | new file mode 100644 | ||
| @@ -0,0 +1 @@ | ||
| 1 | +complete --command jjrb --exclusive --arguments '(jj log --no-pager -T "change_id.short() ++ \"\n\"" 2>/dev/null)' --description "Rebase from source" | |
| new file mode 100644 | |||
| @@ -0,0 +1 @@ | |||
| 1 | +complete --command jjrb --exclusive --arguments '(jj log --no-pager -T "change_id.short() ++ \"\n\"" 2>/dev/null)' --description "Rebase from source" | ||
added
completions/jjrbd.fish +1 -0 | new file mode 100644 | ||
| @@ -0,0 +1 @@ | ||
| 1 | +complete --command jjrbd --exclusive --arguments '(jj log --no-pager -T "change_id.short() ++ \"\n\"" 2>/dev/null)' --description "Rebase from source onto develop" | |
| new file mode 100644 | |||
| @@ -0,0 +1 @@ | |||
| 1 | +complete --command jjrbd --exclusive --arguments '(jj log --no-pager -T "change_id.short() ++ \"\n\"" 2>/dev/null)' --description "Rebase from source onto develop" | ||
added
completions/jjrd.fish +1 -0 | new file mode 100644 | ||
| @@ -0,0 +1 @@ | ||
| 1 | +complete --command jjrd --description "Rebase onto develop" | |
| new file mode 100644 | |||
| @@ -0,0 +1 @@ | |||
| 1 | +complete --command jjrd --description "Rebase onto develop" | ||
added
completions/jjs.fish +1 -0 | new file mode 100644 | ||
| @@ -0,0 +1 @@ | ||
| 1 | +complete --command jjs --description "Show status" | |
| new file mode 100644 | |||
| @@ -0,0 +1 @@ | |||
| 1 | +complete --command jjs --description "Show status" | ||