https://github.com/givensuman/fish-copyutils
some fish plugins for copying stuff
https://github.com/givensuman/fish-copyutils
fish-plugin shell
Last synced: about 2 months ago
JSON representation
some fish plugins for copying stuff
- Host: GitHub
- URL: https://github.com/givensuman/fish-copyutils
- Owner: givensuman
- License: mit
- Created: 2025-01-02T02:24:32.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2026-04-27T00:50:48.000Z (2 months ago)
- Last Synced: 2026-04-27T02:33:26.795Z (2 months ago)
- Topics: fish-plugin, shell
- Language: Shell
- Homepage:
- Size: 105 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# fish-copyutils
A port of the [Oh-My-Zsh](https://github.com/ohmyzsh/ohmyzsh) plugins [copybuffer](https://github.com/ohmyzsh/ohmyzsh/tree/master/plugins/copybuffer), [copyfile](https://github.com/ohmyzsh/ohmyzsh/tree/master/plugins/copyfile), and [copypath](https://github.com/ohmyzsh/ohmyzsh/tree/master/plugins/copypath) for the Fish shell, plus some extras.
### Installation
Install with [fisher](https://github.com/jorgebucaran/fisher):
```shell
fisher install givensuman/fish-copyutils
```
### Usage
#### `copybuffer`
Copy text in command line to clipboard
```shell
echo "A command still being typed" # -> Copy with `ctrl+o`
```
`ctrl+o` keybinding can be rebound with `copybuffer_keybind` variable; just reinstall after doing so
#### `copyfile`
Copy file contents to clipboard
```shell
copyfile hello_world.txt # -> Hello, world!
```
#### `pastefile`
Paste clipboard contents to file
```shell
pastefile hello_world.txt # -> hello_world.txt created
```
#### `copypath`
Copy path to clipboard
```shell
# both of these have the same result
copypath /foo/bar # -> /foo/bar
cd /foo/bar
copypath # -> /foo/bar
```
#### `copy`, `paste`
Aliases for `fish_clipboard_copy` and `fish_clipboard_paste`.
### Requirements
As you might expect, currently heavily leverages the `fish_clipboard_copy` and `fish_clipboard_paste` functions built into the shell, which only support the following system clipboards:
- `pbcopy`
- `wl-copy` using Wayland
- `xsel` and `xclip` for X11
- `clip.exe` on Windows
See the [docs](https://fishshell.com/docs/current/cmds/fish_clipboard_copy.html) for more details.
### License
[MIT](./LICENSE)