Skip to content

dangerous SC2164 recommendation #3429

@mcandre

Description

@mcandre

ShellCheck provides toxic advice for cd customization lines, for example in .zshrc configuration files.

SC2164 insists on triggering exit or return when change directory fails. Wouldn't exit force the entire shell session to terminate?

Frankly, cd has its own exit codes. Why not simply allow those to propagate normally, instead of trying to wrap cd's exit codes in inherently worse error handling code?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions