From f611781a8b101700a6cbed1e5e0fcae948d06d20 Mon Sep 17 00:00:00 2001 From: PowerUser64 Date: Sat, 16 Oct 2021 15:20:00 -0700 Subject: [PATCH] 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. --- .zshrc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.zshrc b/.zshrc index ec21923..0b0ca23 100644 --- a/.zshrc +++ b/.zshrc @@ -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