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 0541977ad3847bc52ae8cd32cc0ac0a4f7bc5675
parent b2c4b43eaaedefd4a2514534431f8be8b1133f42
Author: Anders Damsgaard <anders@adamsgaard.dk>
Date:   Wed,  2 Oct 2019 07:30:37 +0200

Add more fzf bindings

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

diff --git a/.config/sh/commands b/.config/sh/commands @@ -1,6 +1,11 @@ #!/bin/sh alias e='$EDITOR' + +f() { + $EDITOR $(fzf) +} + if type doas >/dev/null 2>&1; then alias se='doas $EDITOR' else @@ -13,9 +18,9 @@ alias xq="xbps-query" alias xr="sudo xbps-remove" alias cg='c "$(git rev-parse --show-toplevel)"' # cd under git repo -alias ch='cd "$(dirs | sort -u | fzy)"' # cd from history +#alias ch='cd "$(dirs | sort -u | fzf --preview='ls {1}')"' # cd from history c() { - dir=$(find "${1:-.}" -type d | grep -v '/\.' | fzf) + dir=$(find "${1:-.}" -type d | grep -v '/\.' | fzf --preview='ls {1}') [ -d "$dir" ] && cd "$dir" || return } @@ -29,7 +34,7 @@ alias lo='l -alo' alias r='fc -s' h() { - eval $(cat "$HISTFILE" | fzf) + eval $(cat "$HISTFILE" | fzf --preview-window=hidden) } o() {