Browse Source

fix clip func for mac

pull/1/head
10sr 12 years ago
parent
commit
e5ee6ba532
1 changed files with 11 additions and 0 deletions
  1. +11
    -0
      bashrc

+ 11
- 0
bashrc View File

@@ -298,6 +298,9 @@ catclip(){
if iswindows if iswindows
then then
cat /dev/clipboard | tr -d \\r cat /dev/clipboard | tr -d \\r
elif isdarwin
then
pbpaste
else else
xclip -o -selection "clipboard" xclip -o -selection "clipboard"
fi fi
@@ -312,6 +315,14 @@ setclip(){
else else
cat "$@" | sed -e 's/$/\r/' | tee /dev/clipboard cat "$@" | sed -e 's/$/\r/' | tee /dev/clipboard
fi fi
elif isdarwin
then
if test $# -eq 0
then
pbcopy
else
cat "$@" | pbcopy
fi
else else
if test $# -eq 0 if test $# -eq 0
then then


Loading…
Cancel
Save