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 c90d4ae4b69c61239560859d1ace46e037100072
parent 94fae9bdb941e47bc3ad83364ff78645fffca55a
Author: Anders Damsgaard <anders@adamsgaard.dk>
Date:   Thu,  9 May 2019 09:34:31 -0700

Disassociate ownership when opening files with o()

Diffstat:
M.commands.sh | 5+++--
1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/.commands.sh b/.commands.sh @@ -36,7 +36,8 @@ alias la='ls -A' o() { [[ "$(uname)" == 'Darwin' ]] && open="open" || open="xdg-open" if [[ "$#" -gt 0 && -f "$1" ]]; then - nohup $open "$1" >/dev/null 2>&1 & + $open "$1" >/dev/null 2>&1 & + disown else IFS=$'\n' out=($(fzf --query="$1" --exit-0 --expect=ctrl-o,ctrl-e --preview-window=hidden)) key=$(head -1 <<< "$out") @@ -47,7 +48,7 @@ o() { elif [ "$key" = ctrl-o ]; then cd "$(dirname "$file")" else - nohup $open "$file" >/dev/null 2>&1 & + $open "$file" >/dev/null 2>&1 & disown fi fi