feat: addet copy command
This commit is contained in:
parent
175a8e7fda
commit
b6464e1707
1 changed files with 13 additions and 0 deletions
13
.zshrc
13
.zshrc
|
@ -175,6 +175,19 @@ __alias__() {
|
||||||
alias grep="grep --color=always"
|
alias grep="grep --color=always"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# ─< define copy command >────────────────────────────────────────────────────────────────
|
||||||
|
if command_exists wl-copy; then
|
||||||
|
copy() {
|
||||||
|
command cat "$1" | wl-copy
|
||||||
|
}
|
||||||
|
elif command_exists xclip; then
|
||||||
|
copy() {
|
||||||
|
command cat "$1" | xclip -selection clipboard
|
||||||
|
}
|
||||||
|
else
|
||||||
|
echo_warning "No clipboard utility found. Please install wl-copy or xclip."
|
||||||
|
fi
|
||||||
|
|
||||||
# ─< linutil >────────────────────────────────────────────────────────────────────────────
|
# ─< linutil >────────────────────────────────────────────────────────────────────────────
|
||||||
alias linutil="curl -fsSL https://christitus.com/linux | sh"
|
alias linutil="curl -fsSL https://christitus.com/linux | sh"
|
||||||
alias "linutil-dev"="curl -fsSL https://christitus.com/linuxdev | sh"
|
alias "linutil-dev"="curl -fsSL https://christitus.com/linuxdev | sh"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue