From 61e0c07ef3b3518e918deff07805a3d3a172eedc Mon Sep 17 00:00:00 2001 From: Richard Klafter Date: Sun, 2 Nov 2014 12:01:54 +0700 Subject: [PATCH] bm open now works on linix and cygwin --- bin/bm | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/bin/bm b/bin/bm index 5f61a6a..7ab618c 100755 --- a/bin/bm +++ b/bin/bm @@ -130,10 +130,17 @@ search_bookmarks() { # open_bookmark() { + if [ "$(expr substr $(uname -s) 1 5)" == "Linux" ]; then #Linx + local open_cmd="xdg-open" + elif [ "$(expr substr $(uname -s) 1 10)" == "MINGW32_NT" ]; then #Windows + local open_cmd="cmd /c start" + else + local open_cmd="open" + fi cat $BOOKMARKS \ | grep $1 \ | cut -d '|' -f 1 \ - | xargs open + | xargs $open_cmd } #