Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/jorgebucaran/autopair.fish

Auto-complete matching pairs in the Fish command line
https://github.com/jorgebucaran/autopair.fish

commandline fish fish-plugin

Last synced: about 1 month ago
JSON representation

Auto-complete matching pairs in the Fish command line

Awesome Lists containing this project

README

        

# autopair.fish

> Auto-complete matching pairs in the [Fish](https://fishshell.com) command line.

Automatically insert, erase, and skip matching pairs as you type in the command-line: `()`, `[]`, `{}`, `""`, and `''`. E.g., pressing `(` inserts `()` and positions the cursor in between the parentheses. Hopefully.

- Insert matching pairs.

```console
$ echo ⎒ # Let's say βŽͺ is the cursor!
```

" πŸ₯Š

```console
$ echo "βŽͺ"
```

- Erase pairs on backspace:

```console
$ echo "HeyβŽͺ"
```

Backspace πŸ₯ŠπŸ₯ŠπŸ₯Š

```console
$ echo "βŽͺ"
```

Backspace πŸ₯Š

```console
$ echo βŽͺ
```

- Skip over matched pairs:

```console
$ echo "HeyβŽͺ"
```

" πŸ₯Š

```console
$ echo "Hey"βŽͺ
```

- Gracefully handle Tab completions for variables while inside double quotes.

```console
$ echo "$fish_color_βŽͺ"
```

Tab πŸ₯Š

```console
$ echo "$fish_color_βŽͺ
"$fish_color_autosuggestion (Variable: '555' 'brblack')
"$fish_color_cancel (Variable: -r)
"$fish_color_command (Variable: blue)
"$fish_color_comment (Variable: red)
...
```

## Installation

Install with [Fisher](https://github.com/jorgebucaran/fisher):

```console
fisher install jorgebucaran/autopair.fish
```

## License

[MIT](LICENSE.md)