dotfiles

Cem's Dotfiles
git clone git://git.ckyln.com/dotfiles.git
Log | Files | Refs | Submodules | README | LICENSE

commit d97f697c565cadbf190388b0a19b3a769914e0c1
parent 52ace3bfafb29dd600c5ecc1efa76368638b3103
Author: Cem Keylan <cem@ckyln.com>
Date:   Thu, 26 Sep 2019 12:30:27 +0300

lfcd command

Diffstat:
M.zshrc | 17++++++++++++++++-
1 file changed, 16 insertions(+), 1 deletion(-)

diff --git a/.zshrc b/.zshrc @@ -83,7 +83,6 @@ ZSH_THEME="keylan" plugins=(git docker docker-compose) source $ZSH/oh-my-zsh.sh - # User configuration # export MANPATH="/usr/local/man:$MANPATH" @@ -111,5 +110,21 @@ source $ZSH/oh-my-zsh.sh # alias ohmyzsh="mate ~/.oh-my-zsh" set -o vi + +bindkey -s '^o' "lfcd\n" +lfcd () { + tmp="$(mktemp)" + lf -last-dir-path="$tmp" "$@" + if [ -f "$tmp" ]; then + dir="$(cat "$tmp")" + rm -f "$tmp" >/dev/null + if [ -d "$dir" ]; then + if [ "$dir" != "$(pwd)" ]; then + cd "$dir" + fi + fi + fi +} + export VIMUP=TRUE source $HOME/.profile