dotfiles

configuration files for shell, text editor, graphical environment, etc.
git clone git://src.adamsgaard.dk/dotfiles
Log | Files | Refs | README | LICENSE Back to index

commit ef8f58d7dce19764824c70e456e2332fc3552165
parent 110b5be20ef414020e00f1ac2c7b30ba4f7028f9
Author: Anders Damsgaard <anders@adamsgaard.dk>
Date:   Fri, 15 Mar 2019 09:11:22 +0100

Open terminal in selected dir with Ctrl-o

Diffstat:
Mlinks/bin/fuzzylaunch | 4+++-
1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/links/bin/fuzzylaunch b/links/bin/fuzzylaunch @@ -1,11 +1,13 @@ #!/usr/bin/env zsh -IFS=$'\n' out=($(fzf --query="$1" --exit-0 --expect=ctrl-e --preview-window=hidden)) +IFS=$'\n' out=($(fzf --query="$1" --exit-0 --expect=ctrl-e,ctrl-o --preview-window=hidden)) key=$(head -1 <<< "$out") file=$(head -2 <<< "$out" | tail -1) if [ -n "$file" ]; then if [ "$key" = ctrl-e ]; then nohup st -e ${EDITOR:-vim} "$file" & + elif [ "$key" = ctrl-o ]; then + cd $(dirname "$file") && nohup st & else nohup xdg-open "$file" & fi