How can I configure a command called 'dc' in zsh that is the opposite of cd? When it receives an argument, it should find that directory by name in $pwd and cd there. When no argument it should just do
cd ... Can you help me achieve this?
Here's how you can create a dc command in zsh that works as the opposite of cd:
dc() {
    if [[ $# -eq 0 ]]; then
        # No arguments - go up one directory
        cd ..
    else