commit 10a746522e5338c20a8a5618d1744483b8ba217d parent d6366d493bbcca4867f2cd405d2a397006c8c748 Author: Anton Konyahin <me@konyahin.xyz> Date: Fri, 8 Mar 2024 20:27:44 +0300 sh: jproject jump to project dir with fzf Diffstat:
M | sh/.config/ksh/kshrc | | | 7 | +++++++ |
1 file changed, 7 insertions(+), 0 deletions(-)
diff --git a/sh/.config/ksh/kshrc b/sh/.config/ksh/kshrc @@ -67,6 +67,13 @@ me () { $EDITOR $(make 2>&1 | grep '^.*\.[ch]:' | fzf | awk -F: '{printf "-c %s %s\n", $2, $1}') } +jproject () { + projects=$(find ~/project/ -type d -maxdepth 1 -mindepth 1 ! -name konyahin) + personal=$(find ~/project/konyahin -type d -maxdepth 1 -mindepth 1) + selected=$(echo "$projects" "$personal" | fzf) + [ -n "$selected" ] && cd "$selected" +} + cheat () { curl "cheat.sh/$1" | bat }