| 1 | ---
 | 
| 2 | default_highlighter: oils-sh
 | 
| 3 | in_progress: yes
 | 
| 4 | ---
 | 
| 5 | 
 | 
| 6 | Interactive Shell Completion
 | 
| 7 | ============================
 | 
| 8 | 
 | 
| 9 | You can use interactive completion directly under `osh` or `ysh`, or clients of
 | 
| 10 | a [headless shell](headless.html) can use it as an API.  
 | 
| 11 | 
 | 
| 12 | ## Completion API
 | 
| 13 | 
 | 
| 14 | The completion API is modeled after the [bash completion
 | 
| 15 | API](https://www.gnu.org/software/bash/manual/html_node/Command-Line-Editing.html#Command-Line-Editing)
 | 
| 16 | 
 | 
| 17 | However, an incompatibility is that it deals with `argv` entries and not
 | 
| 18 | command strings.
 | 
| 19 | 
 | 
| 20 | OSH moves the **responsibility for quoting** into the shell.  Completion
 | 
| 21 | plugins should not do it.
 | 
| 22 | 
 | 
| 23 | - TODO: describe the `compadjust` builtin.  Derived from a cleanup of the
 | 
| 24 |   `bash-completion` project.
 | 
| 25 | 
 |