From 73c339f77cfa9df249cb16f21b7ffad5ea8d8ec9 Mon Sep 17 00:00:00 2001 From: 10sr <8slashes+git@gmail.com> Date: Tue, 28 Aug 2012 23:02:58 +0900 Subject: [PATCH] touch file when open_file in darwin --- bashrc | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/bashrc b/bashrc index cc09812..6a7bbdd 100755 --- a/bashrc +++ b/bashrc @@ -217,12 +217,6 @@ tmux(){ fi } -__my_moc_state(){ - type mocp >/dev/null 2>&1 || return - test "`mocp -Q %state 2>/dev/null`" == PLAY || return - printf "$1" "`mocp -Q %title 2>/dev/null`" -} - mcrypt-stream(){ test $# -eq 2 || return 1 case $1 in @@ -347,6 +341,7 @@ open_file(){ cmd.exe //c start "" "$@" elif isdarwin then + touch "$@" open "$@" elif islinux then @@ -380,6 +375,12 @@ convmv-sjis2utf8-notest(){ convmv -r -f sjis -t utf8 * --notest } +__my_moc_state(){ + type mocp >/dev/null 2>&1 || return + test "`mocp -Q %state 2>/dev/null`" == PLAY || return + printf "$1" "`mocp -Q %title 2>/dev/null`" +} + __my_parse_svn_branch() { local LANG=C local svn_url=$(svn info 2>/dev/null | sed -ne 's#^URL: ##p')