-
-
Notifications
You must be signed in to change notification settings - Fork 82
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
add alias to job configuration #297
base: main
Are you sure you want to change the base?
Conversation
Is that really needed ? This raises a question for users: when defining a job so as to replace another one, which is frequent, do you also automatically replace the aliases? Or do you have to specify the same set of aliases ? |
If it's really needed is of course highly subjective, but for my use cases it would be a nice feature.
I would say that it should completely replace the existing aliases, that would also be the current implementation. |
I wasn't clear. Imagine there's a team specific job "check" with alias "c", and a key-binding Now, on a project of this team, a |
The If the new Another option would be to merge all aliases from each previous job definition in the new job definition. Yet another option would be to keep the previous job definitions and still allow their aliases to be called if they are not overwritten in the new definition. |
Other user opinions welcome |
IMHO I actually think adding aliases complicates the mental for me a bit of how bacon works and which job I would expect to actually be run. I don't personally have a need for aliases and it doesn't really affect me either way as I generally work with hotkeys and do not restart bacon to change job so I don't really have a horse in the race. That disclaimer added if I did need aliases I think I would create a job for each alias instead of defining them in the job I want aliased (Example below). I think that would make it more obvious what priority they have based on where they are defined. It is more typing so if it were something I used often I could see how I would want the syntactic sugar instead. [jobs.example]
command = ["cargo", "run", "--example"]
need_stdout = true
allow_warnings = true
[jobs.ex]
command = ["echo", "alias used"]
on_success = "job:example"
[jobs.exs]
command = ["echo", "alias used"]
on_success = "job:example" |
This allows you to write:
So you can do
bacon example
,bacon ex
andbacon exs
.