Just updated
kd with a long-time feature I wanted: tty detection!
kd f # => jumps to foo
echo $(kd f) # => outputs foo's path
# some creative, if nonsensical, examples:
cp some/file $(kd foo)/app/controllers/whatevs
cp $(kd bar)/Gemfile $(kd foo)/Gemfile
kd foo && cd app/controllers && cp $(kd)/config/whatever .
This is useful and possible because kd's output is stable and predictable: it always returns the
last prefix match of the kdrc file (or, without argument, the project's top-level dir), and it returns non-zero rc on failure. Plus zsh will even gladly expand the result on <TAB> for double checking.