commit e1abda2cf4c51a751f65306767db29285bbe87a2 parent 6df578f00e1107dd149ea104cd2efd2b8c200996 Author: Anders Damsgaard <anders@adamsgaard.dk> Date: Wed, 30 May 2018 16:38:22 -0400 Hide fzf preview window during cd Diffstat:
M | links/.commands.sh | | | 4 | ++-- |
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/links/.commands.sh b/links/.commands.sh @@ -7,12 +7,12 @@ ## cd alias cg='c "$(git rev-parse --show-toplevel)"' # cd under git repo -alias ch='cd "$(dirs -lp | sort -u | fzf)"' # cd from history +alias ch='cd "$(dirs -lp | sort -u | fzf --preview-window=right:hidden )"' # cd from history # change to directory under pwd c() { local dir - dir=$(find "${1:-.}" -type d | grep -v '/\.' | fzf) + dir=$(find "${1:-.}" -type d | grep -v '/\.' | fzf --preview '') [ -n "$dir" ] && cd "$dir" || return }