From ff8372e7b444d82cccbe1375f7ac58fe08423fc8 Mon Sep 17 00:00:00 2001 From: 10sr <8.slashes@gmail.com> Date: Thu, 16 Aug 2018 18:50:27 +0900 Subject: [PATCH] Do not use alias for setclip and catclip if found --- shrc | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/shrc b/shrc index d786bba..4c1b2b1 100755 --- a/shrc +++ b/shrc @@ -874,7 +874,7 @@ then alias pbcopy="reattach-to-user-namespace pbcopy" fi -catclip(){ +__catclip(){ if $iswindows then cat /dev/clipboard | tr -d \\r @@ -886,7 +886,7 @@ catclip(){ fi } -setclip(){ +__setclip(){ if test $# -eq 0 then exec 3<&0 @@ -908,6 +908,11 @@ __EOF__ exec 3<&- } +# Now Homebrew 10sr/pkg/bin provides these commands: +# Fallback to aliases if commands are not installed yet +which catclip >/dev/null || alias catclip=__catclip +which setclip >/dev/null || alias setclip=__setclip + convmv_sjis2utf8_test(){ convmv -r -f sjis -t utf8 * }