From 91043988ab3ca2985959c9eb191937454fa2a5e9 Mon Sep 17 00:00:00 2001 From: sxyazi Date: Fri, 26 Jan 2024 11:00:42 +0800 Subject: [PATCH] docs: add tip for copying selected files to the system clipboard while yanking --- docs/tips.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/docs/tips.md b/docs/tips.md index 8a6d3078..c79f6012 100644 --- a/docs/tips.md +++ b/docs/tips.md @@ -106,6 +106,19 @@ Original post: https://github.com/sxyazi/yazi/discussions/327 Please make sure that `` does not conflict with your other keys. +## Copy selected files to the system clipboard while yanking + +Yazi allows multiple commands to be bound to a single key, so you can set `y` to not only do the `yank` but also execute a shell script: + +```toml +{ + on = [ "y" ], + exec = [ "yank", ''' +shell --confirm 'echo "$@" | xclip -i -selection clipboard -t text/uri-list' +''' ] +} +``` + ## No status bar