From 95c3305cbbb89b36ed42bebf19f32cbee24313d3 Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Mon, 8 Jul 2019 22:04:52 +0200 Subject: [PATCH] Allow entering vifm in pwd with vmm alias vifm enters last open dirs by default. vmm alias opens vifm with the pwd as the opened dir instead. Passing along arbitrary paths to vm also opens vifm there. --- .config/shell/rc.d/vifm-to-vm.sh | 5 +++++ .local/bin/vifmrun | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/.config/shell/rc.d/vifm-to-vm.sh b/.config/shell/rc.d/vifm-to-vm.sh index 201bfd0..7e5ece2 100644 --- a/.config/shell/rc.d/vifm-to-vm.sh +++ b/.config/shell/rc.d/vifm-to-vm.sh @@ -3,5 +3,10 @@ # Check for existence of vifm command. If found, substitute vifm with it. type vifm >/dev/null 2>&1 && alias vm=vifm +# if vifm exists, also let me open current dir in vifm with vmm +type vifm >/dev/null 2>&1 && alias vmm="vifm ${PWD}" + # Check for existence of vifmrun command. If found, substitute vifm with it. type vifmrun >/dev/null 2>&1 && alias vifm=vifmrun + + diff --git a/.local/bin/vifmrun b/.local/bin/vifmrun index a032b41..369273a 100755 --- a/.local/bin/vifmrun +++ b/.local/bin/vifmrun @@ -11,5 +11,5 @@ mkfifo "$FIFO_UEBERZUG" >/dev/null trap cleanup EXIT 2>/dev/null tail --follow "$FIFO_UEBERZUG" | ueberzug layer --silent --parser bash 2>&1 >/dev/null & -vifm +vifm $1 cleanup