zsh: adds fd powers to chx()

I was thinking of doing this in the first place, but decided I'd keep it
simple. Look where I am now.
This commit is contained in:
PowerUser64 2021-10-16 15:20:00 -07:00
parent fb5cef7aef
commit f611781a8b

3
.zshrc
View file

@ -164,9 +164,10 @@
[ -f "${XDG_CONFIG_HOME:-$HOME/.config}/shell/fnrc" ] && source "${XDG_CONFIG_HOME:-$HOME/.config}/shell/fnrc"
# cd search: cd to a directory, given part of its name
# (also can take arguments for an `fd` commnd)
cds() {
if ! [ -z "$1" ];then
cd "$(fd --max-results=1 -t d "$1")" && pwd
cd "$(fd --max-results=1 -t d $@)" && pwd
else
echo "$0: no arguments provided"
return 1