dotfiles

configuration files for shell, text editor, graphical environment, etc.
git clone git://src.adamsgaard.dk/dotfiles
Log | Files | Refs | README | LICENSE Back to index

commit 148e90b366be7dbd6bfe1efbf5407577b03a2686
parent b7a520a31c02b086a391b9dfe637df5b446cde4e
Author: Anders Damsgaard <anders@adamsgaard.dk>
Date:   Thu, 13 Jun 2019 13:55:17 +0200

Use lighter-weight fzy as much as possible

Diffstat:
M.commands.sh | 8+++-----
1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/.commands.sh b/.commands.sh @@ -1,6 +1,5 @@ #!/bin/sh - #### FUNCTIONS AND ALIASES alias b='bash' @@ -12,14 +11,13 @@ alias sx="sxiv -ft *" ## cd alias cg='c "$(git rev-parse --show-toplevel)"' # cd under git repo -alias ch='cd "$(dirs -lp | sort -u | fzf --preview-window=right:hidden )"' # cd from history +alias ch='cd "$(dirs -lp | sort -u | fzy)"' # cd from history # change to directory under pwd c() { dir - dir=$(find "${1:-.}" -type d | grep -v '/\.' | fzf --preview '') - - [ -n "$dir" ] && cd "$dir" || return + dir=$(find "${1:-.}" -type d | grep -v '/\.' | fzy) + [ -d "$dir" ] && cd "$dir" || return } ## ls