zsh: add cds() function (cd search) to cd to a buried directory or any

directory given part of its name
This commit is contained in:
PowerUser64 2021-09-28 22:19:43 -07:00
parent 680295eeed
commit bb1bbcfd37

5
.zshrc
View file

@ -147,6 +147,11 @@
# optionally source an external function file # optionally source an external function file
[ -f "${XDG_CONFIG_HOME:-$HOME/.config}/shell/fnrc" ] && source "${XDG_CONFIG_HOME:-$HOME/.config}/shell/fnrc" [ -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
cds() {
cd **/*"$1"* && pwd
}
# toggles whether a file or group of files is executable # toggles whether a file or group of files is executable
chx() { chx() {
for FILE in "$@";do for FILE in "$@";do