Skip to content

Conversation

mikeland73
Copy link
Contributor

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

@mikeland73 mikeland73 requested review from gcurtis, loreto and Lagoja April 18, 2024 18:30
Copy link
Collaborator

@gcurtis gcurtis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds good to me!

Co-authored-by: Greg Curtis <greg.curtis@jetpack.io>
Signed-off-by: Mike Landau <mikeland86@gmail.com>
@mikeland73 mikeland73 merged commit 935f8ee into main Apr 19, 2024
@mikeland73 mikeland73 deleted the landau/add-gen-alias branch April 19, 2024 21:20
Copy link

sentry-io bot commented May 1, 2024

Suspect Issues

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

  • ‼️ **Generic Error: <redacted errors.withStack>: <redacted usererr.combined> go.jetpack.io/devbox/internal/boxcli/usererr in... View Issue
  • ‼️ **Generic Error: <redacted *errors.withStack>: <redacted errors.withStack>: <redacted usererr.combined> go.jetpack.io/devbox/internal/boxcli/usererr in... View Issue

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

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

Successfully merging this pull request may close these issues.

2 participants