From 3d76563c707d43b038b98ba5f3ba243b96dd714e Mon Sep 17 00:00:00 2001 From: Fabio Scotto di Santolo Date: Mon, 25 Aug 2025 09:04:56 +0200 Subject: [PATCH] Fix ZSH alias for copy and paste on system clipboard from WSL --- zsh/.zshrc | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/zsh/.zshrc b/zsh/.zshrc index 66bf893..ebd6007 100644 --- a/zsh/.zshrc +++ b/zsh/.zshrc @@ -72,16 +72,8 @@ ZSH_PLUGINS_DIR="$ZSH_HOME/plugins" [ -e "$ZSH_PLUGINS_DIR/zsh-autosuggestions/zsh-autosuggestions.zsh" ] && source "$ZSH_PLUGINS_DIR/zsh-autosuggestions/zsh-autosuggestions.zsh" # define user aliases -pbcopy() { - if [ -f "$1" ]; then - mime_type=$(file --mime-type -b "$1") - wl-copy --type "$mime_type" < "$1" - else - printf "%s" "$*" | wl-copy - fi -} - -alias pbpaste='wl-paste --no-newline' +alias pbcopy='xsel --clipboard' +#alias pbpaste='wl-paste --no-newline' alias ls='ls --color=auto --group-directories-first' # Replace Vim implementation @@ -107,7 +99,3 @@ esac if [ -e "$HOME/.cargo" ]; then source "$HOME/.cargo/env" fi - -# if command -v tmux &> /dev/null && [ -z "$TMUX" ]; then -# tmux attach-session -t default || tmux new-session -s default -# fi