jetify-com / devbox

Instant, easy, and predictable development environments
https://www.jetify.com/devbox/
Apache License 2.0
7.94k stars 191 forks source link

[gen] Add gen alias command #2009

Closed mikeland73 closed 2 months ago

mikeland73 commented 2 months ago

Summary

Add a command that allows creating aliases to devbox scripts. This lets users source aliases from any project they want. It's opt-in, works in POSIX and fish. Aliases make it easy to call the scripts for other projects or directories.

How it works:

eval "$(devbox gen alias)"
devbox-build

It builds the alias name using the project name in devbox.json.

Alternatively the user can specify a prefix

eval "$(devbox gen alias --prefix dx)"
dx-build

How was it tested?

eval "$(devbox gen alias --prefix dx)"
dx-build
cd $HOME && dx-build
sentry-io[bot] commented 2 months ago

Suspect Issues

This pull request was deployed and Sentry observed the following issues:

Did you find this useful? React with a 👍 or 👎