diff --git a/.zshrc b/.zshrc index 6a3a46b..fdad16d 100644 --- a/.zshrc +++ b/.zshrc @@ -159,7 +159,12 @@ # cd search: cd to a directory, given part of its name cds() { - cd **/*"$1"* && pwd + if ! [ -z "$1" ];then + cd "$(fd --max-results=1 -t d "$1")" && pwd + else + echo "$0: no arguments provided" + return 1 + fi } # toggles whether a file or group of files is executable