You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is a continuation of #268 and #340 - It appears the conversation abruptly ended without conclusion.
Describe in detail what feature do you want to see in Task.
Given a task file such as:
version: 3tasks:
install:
cmds:
- yarn install
I'd like to be able to do something like task i. Since i can with 100% confidence resolve to install since there are no other tasks that start with i, it could be automatically aliased without the need to force the user to define aliases.
Even though in this situation it feels fluid and expected, the following scenario may end up with suboptimal alias names:
version: 3tasks:
get:serviceham:
cmds:
- ./serviceham.shget:serviceaccount:
cmds:
- kubectl -n hello get serviceaccount {{ .CLI_ARGS }}get:service:
cmds:
- kubectl -n hello get service {{ .CLI_ARGS }}
aliases generated
task get:service
task get:servicea
In this particular case, since service is a strict substring of serviceaccount, This may surprising, especially in the case when new tasks are added to the file that the user was not aware of, and they were used to using this alias functionality. E.G. if task get:service was what the user was used to running that resolved in get:serviceaccount, and later get:service was added, all of a sudden the alias get:service is no longer and alias, but a target. I feel this is dangerous.
One way to resolve this is to give the footgun to the user, such that it's their responsibility to create aliases that could not be ambiguous:
The ordering of how the groups are used in the cmds would inform how the alias is created (if it's possible to figure it out from there or not)
To be honest, the matrix part of this may be related, but since both features could be used in conjection, the matrix could be moved to a separate issue/feature.
The text was updated successfully, but these errors were encountered:
Since aliases are now a merged in #879, this can be closed. If there is still a desire for the matrix functionality described, I feel this should be logged as a new ticket.
Though, I will add that these kind of command shortcuts are very subjective to individuals and I don't feel that they really fit Task. They seem better suited to a user's shell aliases instead.
This is a continuation of #268 and #340 - It appears the conversation abruptly ended without conclusion.
Describe in detail what feature do you want to see in Task.
Given a task file such as:
I'd like to be able to do something like
task i
. Sincei
can with 100% confidence resolve toinstall
since there are no other tasks that start withi
, it could be automatically aliased without the need to force the user to define aliases.Even though in this situation it feels fluid and expected, the following scenario may end up with suboptimal alias names:
aliases generated
In this particular case, since
service
is a strict substring ofserviceaccount
, This may surprising, especially in the case when new tasks are added to the file that the user was not aware of, and they were used to using this alias functionality. E.G. iftask get:service
was what the user was used to running that resolved inget:serviceaccount
, and laterget:service
was added, all of a sudden the aliasget:service
is no longer and alias, but a target. I feel this is dangerous.One way to resolve this is to give the footgun to the user, such that it's their responsibility to create aliases that could not be ambiguous:
In addition to supporting manually managed aliases, it maybe be interesting to programmatically generate tasks & aliases similar to https://github.com/ahmetb/kubectl-aliases?ts=4#syntax-explanation
The ordering of how the groups are used in the
cmds
would inform how the alias is created (if it's possible to figure it out from there or not)To be honest, the
matrix
part of this may be related, but since both features could be used in conjection, the matrix could be moved to a separate issue/feature.The text was updated successfully, but these errors were encountered: