aboutsummaryrefslogtreecommitdiff
path: root/zsh/.zshrc
diff options
context:
space:
mode:
authoreug-vs <eugene@eug-vs.xyz>2022-04-20 16:06:27 +0300
committereug-vs <eugene@eug-vs.xyz>2022-04-20 16:06:27 +0300
commitc96bee99aa33e81303e44d9e749b0ca56986f065 (patch)
treef251f93b393d93d9669d2b89db0e87c65543abf7 /zsh/.zshrc
parent8cfebb1165d3d74c6e4c96d16030c1a8cd2bfbff (diff)
downloaddotfiles-c96bee99aa33e81303e44d9e749b0ca56986f065.tar.gz
fix(zsh): use vifm --choose-dir option
Diffstat (limited to 'zsh/.zshrc')
-rw-r--r--zsh/.zshrc7
1 files changed, 4 insertions, 3 deletions
diff --git a/zsh/.zshrc b/zsh/.zshrc
index 2bc552c..9105e9b 100644
--- a/zsh/.zshrc
+++ b/zsh/.zshrc
@@ -73,10 +73,11 @@ bindkey '^x' fzf-kill-tmux-project
# Use vifm to switch directories and bind it to ctrl-o
function vifmcd () {
- vifm .
+ lastdir=~/.cache/vifm_lastdir
+ vifm . -c ":o" --choose-dir=$lastdir
- if [ -f ~/.config/vifm/lastdir ]; then
- cd $(cat ~/.config/vifm/lastdir)
+ if [ -f $lastdir ]; then
+ cd $(cat $lastdir)
fi
}
bindkey -s '^o' 'vifmcd\n'