summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnthony Wang2024-03-08 23:13:23 -0500
committerAnthony Wang2024-03-08 23:13:23 -0500
commit9008760d84f8658862d716af4a1a118ce45efc20 (patch)
tree39a5752a64964dc24054296febef4eb8a1738487
parent226af706334c4ea7efe0347de80fa4ff63f66063 (diff)
Add ccp.fish (clipboard copy) function
-rw-r--r--fish/functions/ccp.fish8
1 files changed, 8 insertions, 0 deletions
diff --git a/fish/functions/ccp.fish b/fish/functions/ccp.fish
new file mode 100644
index 0000000..c2cba62
--- /dev/null
+++ b/fish/functions/ccp.fish
@@ -0,0 +1,8 @@
+function ccp
+ begin
+ if not isatty stdin
+ read
+ end
+ cat $argv
+ end | fish_clipboard_copy
+end