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

New command exec and support of aliases #853

Merged
merged 3 commits into from
Sep 30, 2021
Merged

New command exec and support of aliases #853

merged 3 commits into from
Sep 30, 2021

Conversation

Fabien-Chouteau
Copy link
Member

No description provided.

Copy link
Member

@mosteo mosteo left a comment

Choose a reason for hiding this comment

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

Nice feats, I'll have alr list back :-)

src/alr/alr-commands-exec.adb Outdated Show resolved Hide resolved
@mosteo
Copy link
Member

mosteo commented Sep 17, 2021

An observation: from my testing it seems that once you define an alias, you cannot pass extra switches. For example, if display is an alias for show, running alr display --graph will ignore the switch. Would this make sense?

@Fabien-Chouteau
Copy link
Member Author

An observation: from my testing it seems that once you define an alias, you cannot pass extra switches. For example, if display is an alias for show, running alr display --graph will ignore the switch. Would this make sense?

It's not supposed to do that... I will check.

@Fabien-Chouteau
Copy link
Member Author

@mosteo

It works on my side:

$ alr config --set --global alias.display show
$ alr display --graph
# Synchronizing workspace...
Dependencies automatically updated as follows:  
[...]
Dependencies (graph):
                                      +-----------------------++-------------------+

@mosteo
Copy link
Member

mosteo commented Sep 17, 2021

Right you are... I messed something up in my previous attempt, sorry for the noise.

@Fabien-Chouteau Fabien-Chouteau changed the base branch from next to master September 22, 2021 10:13
@Fabien-Chouteau
Copy link
Member Author

@mosteo I think I should introduce the -- double-dash delimiter for alr exec and alr build.
In case we want options for these commands in the future, e.g.:

$ alr build --mode=release -- -XTEST=plop -cargs -g # only "-XTEST=plop -cargs -g" is passed to gprbuild

what do you think?

@mosteo
Copy link
Member

mosteo commented Sep 28, 2021

Sounds very sensible

@onox
Copy link
Contributor

onox commented Sep 28, 2021

@mosteo I think I should introduce the -- double-dash delimiter for alr exec and alr build.

Would this help to allow global options be moved back to after the command? Having 1 place where the user can define global and command-specific options would be easier for users.

@Fabien-Chouteau
Copy link
Member Author

Global options would still have to be placed before the command. It's cleaner to separate the two in my opinion.

@Fabien-Chouteau Fabien-Chouteau force-pushed the feat/exec_alias branch 3 times, most recently from c4d59fa to 59a638f Compare September 29, 2021 15:30
@mosteo mosteo merged commit 4d1014c into master Sep 30, 2021
@mosteo mosteo deleted the feat/exec_alias branch September 30, 2021 15:13
@mosteo
Copy link
Member

mosteo commented Sep 30, 2021

Another great couple of features; thanks, Fabien.

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

Successfully merging this pull request may close these issues.

3 participants