Commit b8be384
authored
More thoughtful completion (#126)
* More thoughtful completion
A variety of improvements to bash_kernel's completion, all of which try
to more semantically match what the user (read: @kdm9) expects when
completing from a given position. In particular:
- not completing command names while in something that looks like a
path (e.g. `./path/ap<tab>` shouldn't complete the command named
`apt`, only the path named `./path/apple.txt`).
- Splitting completion prompts at `=` and `"`, so that one can e.g. complete
the path in `variable="./path<tab>"`.
As with all code that tries to be smart, this will likely have a few
undesirable corner cases. Please report any issues you encounter!
* tokenise around stream redirection1 parent cdaed43 commit b8be384
1 file changed
+32
-11
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
249 | 249 | | |
250 | 250 | | |
251 | 251 | | |
252 | | - | |
253 | | - | |
254 | | - | |
255 | | - | |
256 | | - | |
257 | | - | |
258 | 252 | | |
259 | 253 | | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
260 | 260 | | |
261 | 261 | | |
262 | | - | |
263 | | - | |
| 262 | + | |
264 | 263 | | |
265 | 264 | | |
266 | 265 | | |
267 | 266 | | |
268 | 267 | | |
269 | 268 | | |
270 | 269 | | |
271 | | - | |
272 | | - | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
273 | 287 | | |
274 | | - | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
275 | 296 | | |
276 | 297 | | |
277 | 298 | | |
| |||
0 commit comments