Skip to content

Command intercept failure #163

@zhangying098

Description

@zhangying098

I want to know what to return in the preexec function so that the command will not continue executing. I tried return 1, but the command still executed.

function preexec () {
if [[ "${1}" == "rm" ]]; then
return 1
fi
}

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