Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/nickeb96/puffer-fish
🐡 Text Expansions for Fish
https://github.com/nickeb96/puffer-fish
fish fish-plugin fisher shell-extension
Last synced: 2 months ago
JSON representation
🐡 Text Expansions for Fish
- Host: GitHub
- URL: https://github.com/nickeb96/puffer-fish
- Owner: nickeb96
- License: mit
- Created: 2019-05-22T17:46:46.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2024-03-19T01:03:05.000Z (10 months ago)
- Last Synced: 2024-06-19T03:04:29.261Z (7 months ago)
- Topics: fish, fish-plugin, fisher, shell-extension
- Language: Shell
- Homepage:
- Size: 91.8 KB
- Stars: 247
- Watchers: 5
- Forks: 5
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awsm.fish - Pufferfish - Text Expansions for Fish (Plugins)
README
# Puffer Fish
> Text Expansions for [Fish](https://fishshell.com/)
Typing consecutive dots after `..` will automatically expand to `../..`, then `../../..` and so on. It expands in place as you type to allow directory tab-completion to work. This can be useful with any command where you want to reference a parent directory that is more than one back. i.e. `cd ....` or `vi .../Cargo.toml`.
![dot dot demo](./media/dot-dot-demo.gif)
It's a little hard to see in the demo because it expands as you type, but `cp ..../template/Makefile .` is being typed.
--------------------------------------------------------------------------------
Typing `!!` will expand to the previous command, similar to Zsh, Bash, and other shells. For example, if you type `apt update` you will likely see a permisison error. You can then type `sudo !!` and it will expand to `sudo apt update`.
![exclamation demo](./media/exclamation-demo.gif)
This can be especially useful if you don't want to retype a long command, or navigate around with the arrow keys. Or if you want to re-run a command as part of pipeline.
```console
> some-long-command -abcdef --long-option --another-long-option /a/long/path/to/somewhere
...
> cat file1 file2 | !! | grep 'search-key' | wrap -s
...
```--------------------------------------------------------------------------------
Typing `!$` will expand to the last argument. For example, if you searched packages with pacman and found nothing, you'd like to also search in the AUR.
```console
> pacman -Ss something
...
> paru -Ss !$
...
```## Installation
Install with [Fisher](https://github.com/jorgebucaran/fisher "fish plugin manager"):
```console
fisher install nickeb96/puffer-fish
```#### Manually
Just copy `functions/*` and `conf.d/*` to your `$__fish_config_dir` directory. Make sure to create them if they don't already exist.
## LICENSE
[MIT](LICENSE)