A cross-platform Fish shell plugin that copies absolute file and directory paths to the system clipboard.
Use copypath when you want to paste a path into an editor, issue, chat, or another terminal without typing it by hand. It provides the familiar copypath workflow from Oh My Zsh, built for Fish with path completion and cross-platform clipboard support.
fish-copypath requires Fish 3.5 or later and Fisher.
fisher install u1aryz/fish-copypathTo install a specific release:
fisher install u1aryz/fish-copypath@v1.0.0To uninstall:
fisher remove u1aryz/fish-copypathCopy the current directory:
$ copypath
Copied: /home/user/projectCopy a file or directory path:
$ copypath ./README.md
Copied: /home/user/project/README.mdRelative paths are converted to absolute paths without resolving symbolic links. File and directory completion is available for the path argument.
fish-copypath automatically uses the first available backend:
| Environment | Clipboard backend |
|---|---|
| macOS | pbcopy |
| Cygwin or MSYS | /dev/clipboard |
| Windows or WSL | clip.exe |
| Wayland | wl-copy |
| X11 | xsel or xclip |
| Remote and alternative environments | lemonade, doitclient, win32yank, termux-clipboard-set, or tmux |
Inspired by the copypath.plugin.zsh plugin from Oh My Zsh.
