Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/laughedelic/pisces
♓️ Fish shell plugin that helps you to work with paired symbols in the command line
https://github.com/laughedelic/pisces
fish fish-packages fish-plugin fish-plugins fish-shell fisher fishshell keybindings oh-my-fish oh-my-fish-plugin paired-symbols plugin
Last synced: 4 days ago
JSON representation
♓️ Fish shell plugin that helps you to work with paired symbols in the command line
- Host: GitHub
- URL: https://github.com/laughedelic/pisces
- Owner: laughedelic
- License: other
- Created: 2016-05-09T20:38:47.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2020-11-30T02:30:19.000Z (about 4 years ago)
- Last Synced: 2025-01-10T08:18:48.848Z (11 days ago)
- Topics: fish, fish-packages, fish-plugin, fish-plugins, fish-shell, fisher, fishshell, keybindings, oh-my-fish, oh-my-fish-plugin, paired-symbols, plugin
- Language: Shell
- Homepage:
- Size: 49.8 KB
- Stars: 282
- Watchers: 6
- Forks: 12
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# [`pisces ☯ 双鱼`](https://en.wikipedia.org/wiki/Pisces_(astrology))
[![](https://img.shields.io/github/v/release/laughedelic/pisces?color=brightgreen)](https://github.com/laughedelic/pisces/releases/latest)
[![](https://img.shields.io/badge/fish--shell-2.3+-blue.svg)](https://github.com/fish-shell/fish-shell/releases)
[![](https://img.shields.io/badge/license-LGPLv3-blue.svg)](https://www.tldrlegal.com/l/lgpl-3.0)
[![](https://img.shields.io/badge/contact-gitter_chat-dd1054.svg)](https://gitter.im/laughedelic/pisces)_pisces_ `['paɪsiz]` is a plugin for [fish](https://fishshell.com/) that helps you to work with paired symbols like `()` and `''` in the command line. Similar to your favorite text editor!
## Features
Here `|` denotes the current cursor position. No manual cursor motion involved :sparkles:
- autocloses pair symbol:
`... |` + ( ⇒
`... (|)`
- skips the closing symbol:
`...|)` + ) ⇒
`... )|`
- removes empty pairs:
`...([|])` + backspace ⇒
`...(|)` + backspace ⇒
`...|`
- the set of pairs is configurable (see below)## Installation
Notes on fish 2.x compatibility
> The _minimum recommended_ version of fish is v2.6, because
> - it has a feature called [_bracketed (a.k.a safe) paste_](https://github.com/fish-shell/fish-shell/pull/3871) which solves the problem with pasting strings containing paired symbols (they get autoclosed), see [#6](https://github.com/laughedelic/pisces/issues/6) for details.
>
> The _minimum required_ version of fish is v2.3, because
> - there was a bug [#2210](https://github.com/fish-shell/fish-shell/issues/2210) in v2.2 which would brake quotes handling
> - it uses `string` builtin which was introduced in v2.3- Using [Fisher](https://github.com/jorgebucaran/fisher):
```fish
fisher install laughedelic/pisces
```- Using [oh-my-fish](https://github.com/oh-my-fish/oh-my-fish):
```fish
omf install pisces
```Notice that you will need to _restart_ fish to get this new installation working. This is specific to the way oh-my-fish handles installation.
## Configuration
### Only completing at the end of the line
To disable completing pairs unless the cursor is at the end of the line, set the `$pisces_only_insert_at_eol` variable:
```fish
set -U pisces_only_insert_at_eol 1
```### Changing the set of pairs
You can set the `$pisces_pairs` universal variable and launch a new fish session to reload key bindings:
```fish
set -U pisces_pairs $pisces_pairs '<,>' '`,`' '«,»'
```Note that at the moment _pisces_ works correctly only with single-symbol delimiters.
The default set of pairs:
- `(,)` parenthesis
- `[,]` brackets
- `{,}` braces
- `","` double quotes
- `','` single quotes