shells/zsh: add j and jh for jumping
This commit is contained in:
parent
09cb021ac7
commit
af0bc24fe4
1 changed files with 10 additions and 0 deletions
|
@ -37,6 +37,16 @@
|
||||||
if [[ "$(basename "$(readlink "/proc/$PPID/exe")")" == ".kitty-wrapped" ]]; then
|
if [[ "$(basename "$(readlink "/proc/$PPID/exe")")" == ".kitty-wrapped" ]]; then
|
||||||
PATH=$(echo "$PATH" | sed 's/\/nix\/store\/[a-zA-Z._0-9-]\+\/bin:\?//g' | sed 's/:$//')
|
PATH=$(echo "$PATH" | sed 's/\/nix\/store\/[a-zA-Z._0-9-]\+\/bin:\?//g' | sed 's/:$//')
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
j() {
|
||||||
|
if [[ $# -eq 0 ]] then
|
||||||
|
\builtin cd -- "$(fd -H -t d | fzf)"
|
||||||
|
else
|
||||||
|
\builtin cd -- "$(fd -H -t d | fzf -1 -q "$@")"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
alias "jh"="cd ~ && j"
|
||||||
'';
|
'';
|
||||||
|
|
||||||
dotDir = ".config/zsh";
|
dotDir = ".config/zsh";
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue