commit 70c9e20e1cfba4403dd50baeead5186b26df6376 parent 3dd7dabbcecea949027db9900020aa25ed8f0d85 Author: Anders Damsgaard <anders@adamsgaard.dk> Date: Thu, 14 Feb 2019 10:41:06 +0100 Fix editor open in fuzzy launcher Diffstat:
M | links/bin/fuzzylaunch | | | 6 | ++++-- |
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/links/bin/fuzzylaunch b/links/bin/fuzzylaunch @@ -4,8 +4,10 @@ IFS=$'\n' out=($(fzf --query="$1" --exit-0 --expect=ctrl-e --preview-window=hidd key=$(head -1 <<< "$out") file=$(head -2 <<< "$out" | tail -1) if [ -n "$file" ]; then - [ "$key" = ctrl-e ] && \ - ${EDITOR:-vim} "$file" || \ + if [ "$key" = ctrl-e ]; then + nohup st -e ${EDITOR:-vim} "$file" & + else nohup xdg-open "$file" & + fi sleep 0.25 fi