Skip to content

Latest commit

 

History

18 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

fish-copypath

CI GitHub Release Fish Shell Fisher License

A cross-platform Fish shell plugin that copies absolute file and directory paths to the system clipboard.

fish-copypath demo

Why fish-copypath?

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.

Installation

fish-copypath requires Fish 3.5 or later and Fisher.

fisher install u1aryz/fish-copypath

To install a specific release:

fisher install u1aryz/fish-copypath@v1.0.0

To uninstall:

fisher remove u1aryz/fish-copypath

Usage

Copy the current directory:

$ copypath
Copied: /home/user/project

Copy a file or directory path:

$ copypath ./README.md
Copied: /home/user/project/README.md

Relative paths are converted to absolute paths without resolving symbolic links. File and directory completion is available for the path argument.

Clipboard support

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

Acknowledgments

Inspired by the copypath.plugin.zsh plugin from Oh My Zsh.

License

MIT

About

Copy absolute file and directory paths to the system clipboard from Fish.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages