From 552500ddd8d64519f192f57c2dd53cfeb1ce1028 Mon Sep 17 00:00:00 2001 From: Jikku Jose Date: Fri, 20 Jun 2014 03:20:31 -0700 Subject: [PATCH] fo to open files (primarily for videos) --- examples.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/examples.md b/examples.md index 9767803..0e0156e 100644 --- a/examples.md +++ b/examples.md @@ -121,4 +121,15 @@ fs() { fzf --query="$1" --select-1 --exit-0) && tmux switch-client -t "$session" } +``` + +open files +---- + +```sh +fo() { + local file + file=$(fzf --query="$1" --select-1 --exit-0) + [ -n "$file" ] && open "$file" +} ``` \ No newline at end of file