Support backgrounding ascii in vifm + tmux

This commit is contained in:
Akemi Izuko 2022-09-12 20:15:31 -06:00
parent ad0930bfab
commit 7e56974965
No known key found for this signature in database
GPG key ID: 905D444F6A5E4BE4

View file

@ -29,6 +29,12 @@ open_file() {
html)
chromium "$1" &>/dev/null &
;;
*)
if [[ -n "$TMUX" ]] && file "$1" | grep -iq 'ascii'; then
tmux new-window -c "#{pane_current_path}"
sleep .2 # Let bash login, otherwise command won't get sent
tmux send-keys "vi $1" Enter
fi
esac
}