pi-autosuggestions 0.6.3 → 0.7.3
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.
- package/README.md +31 -31
- package/dist/autosuggestions.d.ts +3 -0
- package/dist/autosuggestions.d.ts.map +1 -0
- package/dist/autosuggestions.js +1570 -0
- package/dist/autosuggestions.js.map +1 -0
- package/package.json +33 -4
- package/extensions/autosuggestions.ts +0 -1018
package/README.md
CHANGED
|
@@ -31,12 +31,12 @@ Default: off (history is session-scoped).
|
|
|
31
31
|
|
|
32
32
|
## Scope
|
|
33
33
|
|
|
34
|
-
| Layer
|
|
35
|
-
|
|
36
|
-
| History ghost suggestions
|
|
37
|
-
| Path completion + dropdown | **Bash mode only** (`!`/`!!` commands)
|
|
38
|
-
| Command-name completion
|
|
39
|
-
| Beam cursor
|
|
34
|
+
| Layer | Where it works |
|
|
35
|
+
| -------------------------- | ------------------------------------------------------ |
|
|
36
|
+
| History ghost suggestions | **Everywhere** — normal prompts and `!`/`!!` bash mode |
|
|
37
|
+
| Path completion + dropdown | **Bash mode only** (`!`/`!!` commands) |
|
|
38
|
+
| Command-name completion | **Bash mode only**, first word after `!` |
|
|
39
|
+
| Beam cursor | **Everywhere** |
|
|
40
40
|
|
|
41
41
|
History is **session-scoped by default**: the ghost suggests prompts you
|
|
42
42
|
submitted in the current session. Opt into **cross-session history** with
|
|
@@ -72,11 +72,11 @@ paints it blue and ignores cursor-color overrides (warpdotdev/Warp#3210).
|
|
|
72
72
|
For well-known commands the **first argument** completes from a built-in
|
|
73
73
|
subcommand table instead of the filesystem:
|
|
74
74
|
|
|
75
|
-
| Input
|
|
76
|
-
|
|
77
|
-
| `!git s`
|
|
78
|
-
| `!git statu` | inline ghost `s` → `status`
|
|
79
|
-
| `!git zz`
|
|
75
|
+
| Input | Result |
|
|
76
|
+
| ------------ | ----------------------------------------------------------------- |
|
|
77
|
+
| `!git s` | dropdown — `show`, `stash`, `status`, … (marked `git subcommand`) |
|
|
78
|
+
| `!git statu` | inline ghost `s` → `status` |
|
|
79
|
+
| `!git zz` | no subcommand match → falls back to path completion |
|
|
80
80
|
|
|
81
81
|
Covered commands: `git`, `npm`, `pnpm`, `yarn`, `bun`, `docker`, `kubectl`,
|
|
82
82
|
`cargo`, `brew`, `gh`, `go`, `uv`, `pip`, `poetry`, `terraform`, `helm`,
|
|
@@ -89,40 +89,40 @@ filesystem.
|
|
|
89
89
|
Some completions are **live** — the extension reads your project instead of a
|
|
90
90
|
static table (results cached for 10s):
|
|
91
91
|
|
|
92
|
-
| Input
|
|
93
|
-
|
|
94
|
-
| `!git checkout f` / `!git switch` / `!git merge` / `!git rebase`
|
|
95
|
-
| `!npm run d` / `!pnpm run` / `!bun d` (implicit for yarn/pnpm/bun) | `scripts` from the nearest `package.json`
|
|
96
|
-
| `!make d`
|
|
97
|
-
| `!docker compose u`
|
|
98
|
-
| `!docker start n` / `logs` / `exec` …
|
|
99
|
-
| `!kubectl get p`
|
|
100
|
-
| `!ssh ` / `!scp `
|
|
92
|
+
| Input | Source |
|
|
93
|
+
| ------------------------------------------------------------------ | ------------------------------------------ |
|
|
94
|
+
| `!git checkout f` / `!git switch` / `!git merge` / `!git rebase` | branch names from `git branch` |
|
|
95
|
+
| `!npm run d` / `!pnpm run` / `!bun d` (implicit for yarn/pnpm/bun) | `scripts` from the nearest `package.json` |
|
|
96
|
+
| `!make d` | targets parsed from the nearest `Makefile` |
|
|
97
|
+
| `!docker compose u` | compose subcommands |
|
|
98
|
+
| `!docker start n` / `logs` / `exec` … | running container names |
|
|
99
|
+
| `!kubectl get p` | resource types |
|
|
100
|
+
| `!ssh ` / `!scp ` | hosts from `~/.ssh/config` |
|
|
101
101
|
|
|
102
102
|
### Command completion (bash mode)
|
|
103
103
|
|
|
104
104
|
The first word after `!` completes against **executables on your `$PATH`** —
|
|
105
105
|
like zsh's command position, no plugins needed:
|
|
106
106
|
|
|
107
|
-
| Input
|
|
108
|
-
|
|
109
|
-
| `!gi`
|
|
110
|
-
| `!whoa` | inline ghost `mi` → `whoami`
|
|
107
|
+
| Input | Result |
|
|
108
|
+
| ------- | ---------------------------------------------------- |
|
|
109
|
+
| `!gi` | dropdown — `git`, `gh`, `gimp`, … (marked `command`) |
|
|
110
|
+
| `!whoa` | inline ghost `mi` → `whoami` |
|
|
111
111
|
|
|
112
112
|
File paths that also match are listed after the commands. Per-command
|
|
113
|
-
|
|
113
|
+
_subcommand_ completion (`git st` → `status`) is zsh's `compdef` system and is
|
|
114
114
|
out of scope — use history or type it.
|
|
115
115
|
|
|
116
116
|
### Path completion (fish/zsh-completion flavored)
|
|
117
117
|
|
|
118
118
|
In bash mode (`!command`), a second strategy completes **filesystem paths**:
|
|
119
119
|
|
|
120
|
-
| Input
|
|
121
|
-
|
|
122
|
-
| `!cd`
|
|
123
|
-
| `!cd D`
|
|
124
|
-
| `!cd Dow`
|
|
125
|
-
| `→` / `Tab`
|
|
120
|
+
| Input | Result |
|
|
121
|
+
| ------------------ | -------------------------------------------------------- |
|
|
122
|
+
| `!cd` | dropdown — all entries |
|
|
123
|
+
| `!cd D` | dropdown — filtered to `D*` |
|
|
124
|
+
| `!cd Dow` | inline ghost `nloads/` |
|
|
125
|
+
| `→` / `Tab` | accept |
|
|
126
126
|
| accept a directory | immediately suggests its first entry (zsh-like chaining) |
|
|
127
127
|
|
|
128
128
|
- **Command position aware** — `!cd` (no space yet) lists everything; picking an
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"autosuggestions.d.ts","sourceRoot":"","sources":["../src/autosuggestions.ts"],"names":[],"mappings":"AAUA,OAAO,EAEL,KAAK,YAAY,EAElB,MAAM,iCAAiC,CAAA;AAklDxC,MAAM,CAAC,OAAO,WAAW,EAAE,EAAE,YAAY,GAAG,IAAI,CAkC/C"}
|