dotfiles

Settings and scripts
git clone git://git.konyahin.xyz/dotfiles
Log | Files | Refs | LICENSE

commit 2f4afe98bc8d8cad5c21d337bdbef90152a7f58e
parent 3605e31920f369cc931d296e0527f807abf5dec5
Author: Anton Konyahin <me@konyahin.xyz>
Date:   Wed, 31 May 2023 16:58:21 +0300

sh: search files and dirs by /

Diffstat:
Msh/.config/ksh/kshrc | 14+++++---------
1 file changed, 5 insertions(+), 9 deletions(-)

diff --git a/sh/.config/ksh/kshrc b/sh/.config/ksh/kshrc @@ -52,16 +52,12 @@ alias cvsupdate='cvs -q up -Pd -A' alias cvsdiff='cvs diff -uNp' alias cvsrestore='cvs update -C' -j () { - cd $(cat <<EOF | -project /home/anton/project -dotfiles /home/anton/dotfiles -ports /usr/ports -sources /usr/src -notes /home/anton/data/notes -EOF -fzf --with-nth=1 --preview='ls {2}' | awk '{print $2}') +fzf-in () { + found=$(find . -not -path "*.git*" | fzf) + [ -d "$found" ] && cd "$found" && return + [ -f "$found" ] && $EDITOR "$found" && return } +alias /=fzf-in me () { $EDITOR $(make 2>&1 | grep '^.*\.[ch]:' | fzf | awk -F: '{printf "-c %s %s\n", $2, $1}')