https://github.com/BrewingWeasel/fishbang
bash bang commands for fish
https://github.com/BrewingWeasel/fishbang
command-line fish fish-plugin
Last synced: about 2 months ago
JSON representation
bash bang commands for fish
- Host: GitHub
- URL: https://github.com/BrewingWeasel/fishbang
- Owner: BrewingWeasel
- License: bsd-3-clause
- Created: 2023-03-12T19:17:14.000Z (about 2 years ago)
- Default Branch: master
- Last Pushed: 2025-01-10T05:08:08.000Z (4 months ago)
- Last Synced: 2025-03-10T11:45:23.369Z (about 2 months ago)
- Topics: command-line, fish, fish-plugin
- Language: Shell
- Homepage:
- Size: 8.79 KB
- Stars: 22
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: LICENSE
Awesome Lists containing this project
README
# Fishbang
Uses abbreviations in order to replicate the various bash bang commands.
This has the advantage of replacing everything inline, so you can be more confident in using them.## Examples:
- ``!dnf`` returns the last command that started with dnf
- ``!?abc`` returns the last command that included abc
- ``!3`` returns the 3rd command used. ``!-3`` returns the 3rd most recent command used.
- ``!!`` returns the last command. Taken from the fish documentation
- ``!^`` returns the first argument of the last command
- ``!$`` returns the last argument of the last command
- ``!*`` returns all the arguments of the last command
- ``!:n`` returns the nth argument of the last command## Install
### Installing with [Fisher](https://github.com/jorgebucaran/fisher):
```fish
fisher install brewingweasel/fishbang
```### Installing with [oh-my-fish](https://github.com/oh-my-fish/oh-my-fish) *should* also work:
```fish
omf install https://github.com/BrewingWeasel/fishbang
```# Troubleshooting:
### Unable to use `!$` at the end of the line:
You have two options:1. Press space before enter
2. Rebind enter to also expand the abbreviation:
`bind enter expand-abbr execute`
or (for vi keybinds):
`bind -M insert enter expand-abbr execute`
`bind -M default enter expand-abbr execute`