How Can I Change the Command Used by the `auto_cd` Option

This page summarizes the projects mentioned and recommended in the original post on /r/zsh

Our great sponsors
  • WorkOS - The modern identity platform for B2B SaaS
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • SaaSHub - Software Alternatives and Reviews
  • ohmyzsh

    🙃 A delightful community-driven (with 2,300+ contributors) framework for managing your zsh configuration. Includes 300+ optional plugins (rails, git, macOS, hub, docker, homebrew, node, php, python, etc), 140+ themes to spice up your morning, and an auto-update tool so that makes it easy to keep up with the latest updates from the community.

  • I don't think you can do this with auto_cd itself, but you could always accomplish something like this with the Zsh line editor, similar to how magic-enter works. I'm sure someone can improve upon this, but here's a starting point that worked just fine for me (in my limited testing):

  • zsh4humans

    A turnkey configuration for Zsh

  • # with a bare directory, cd there and push it onto the directory stack setopt autocd autopushd # ls whenever we change directory autoload add-zsh-hook .cd.ls(){ ls } add-zsh-hook chpwd .cd.ls # bind Ctrl-O to pop the most recent directory and refresh the prompt # doesn't work with p10k, you'd need something like this: # https://github.com/romkatv/zsh4humans/blob/v5/fn/-z4h-cd-rotate .zle.popd(){ popd -q && zle reset-prompt } zle -N .zle.popd bindkey '^o' popd

  • WorkOS

    The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.

    WorkOS logo
NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts