From a4bb2c7ab249a2cf2bfd0b36c5d52f79b0d47f26 Mon Sep 17 00:00:00 2001 From: Gopher Date: Sun, 23 Mar 2025 09:20:18 +0530 Subject: [PATCH] Changes in: zsh, --- zsh/.zshrc | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/zsh/.zshrc b/zsh/.zshrc index 2453f56..39ac627 100755 --- a/zsh/.zshrc +++ b/zsh/.zshrc @@ -105,6 +105,19 @@ alias ....='cd ../..' alias ..='cd ..' alias ~='cd ~' +cpcf() { + local file + + file=$(fzf --query="$1" --preview 'bat --color=always {}' --preview-window 'right:60%' --bind 'ctrl-d:preview-page-down,ctrl-u:preview-page-up') + + if [ -n "$file" ]; then + cat "$file" | wl-copy + echo "Copied: $file" + else + echo "No file selected." + fi +} + gh_open() { xdg-open "https://github.com/ad1822/$1" }