Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mommy can be run every time you run cargo~ #77

Open
jyn514 opened this issue Jan 22, 2024 · 1 comment
Open

mommy can be run every time you run cargo~ #77

jyn514 opened this issue Jan 22, 2024 · 1 comment

Comments

@jyn514
Copy link

jyn514 commented Jan 22, 2024

i promised ages ago to document this and then i never did lmao

here is a dump of my ~/.profile, which makes e.g. cargo build act as if you'd run cargo mommy build

# mommy loves you~
cargo() {
    case "$1" in
    +*) toolchain=$1
        shift
        command cargo "$toolchain" mommy "$@"
        ;;
    *) command cargo mommy "$@";;
    esac
}
@jyn514
Copy link
Author

jyn514 commented Jan 22, 2024

you can also configure your prompt to run mommy so you can get feedback even if you're not running cargo~

PS1='$(if [ $? = 0 ]; then CARGO=true cargo-mommy; else CARGO=false cargo-mommy; fi)'"$PS1"

but don't do both unless you want to get double the feedback from mommy!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant