Skip to content

Commit

Permalink
fix(blaggacao): j function
Browse files Browse the repository at this point in the history
  • Loading branch information
blaggacao committed Oct 31, 2022
1 parent e3b670d commit 7deef59
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions comb/blaggacao/homeProfiles/shellPrograms.nix
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,20 @@
"_" = "sudo ";
};
initExtra = ''
function j() {
if [ $# -eq 0 ]; then
_j_dir="$(fd --type d '\.git$' --hidden $HOME/src/ -d5 --prune | xargs dirname | fzf)"
else
_j_dir=$(command h "$HOME/src" "$@")
fi
_j_ret=$?
[ "$_j_dir" != "$PWD" ] && cd "$_j_dir"
return $_j_ret
}
alias kak="~/src/github.com/mawww/kakoune/src/kak"
export EDITOR=$(which kak)
Expand Down

0 comments on commit 7deef59

Please sign in to comment.