copydirfn is a Zsh plugin (Oh My Zsh compatible) to quickly copy file names from a directory to the clipboard.
- Shell: Zsh
- Framework: Oh My Zsh (recommended for automatic plugin loading)
- Prompt (optional): fully compatible with Oh My Posh and Starship
git clone https://github.com/TheJisus28/copydirfn.git ~/.oh-my-zsh/custom/plugins/copydirfnThen add copydirfn to plugins=() in ~/.zshrc and source ~/.zshrc.
copydirfn [-r] [--ext=ext1,ext2] [directory]-r, --recursiveinclude subdirectories.-e, --ext=ext1,ext2filter by extensions (no dot, comma-separated).
Examples
copydirfn . # copy file names in current dir
copydirfn -r . # copy file names recursively
copydirfn --ext=txt,md . # copy only .txt and .md
copydirfn -r --ext=js src # copy .js recursively under src- Wayland:
wl-copy - X11:
xclip,xsel - macOS:
pbcopy - Windows / WSL:
clip.exe,clip,win32yank -i