2019-09-10 09:29:01 -07:00
|
|
|
mixin @beta Efl.Core.Command_Line requires Efl.Object {
|
Revert "Revert command line array object because it's broken by design"
This reverts commit a57c7f751023fe1d1edeabbf8683574ac7497e5e.
I pretty much hate to just revert your revert, but you failed to read my
replies, and failed to understand what i was talking about.
And YES we talked at fosdem about the platform issue, and do you
remember my answer, that back in time this might be the case, today is
different freebsd suppoerts setenv, and for windows we have a setenv
implementation in evil. And yes, vtorri also created a issue how bad and
evil this commit is, however, i still fail to see the issue since setenv
unsetenv and clearenv usages are taken as needed. (T7693)
The ownership question is answered in
https://phab.enlightenment.org/D7516#137367.
Can we please get into a state of technical discussions, and not *oh
shit, i am going to revert this* this has been in review for a long
time, a lots of people have tested it, we discussed things on it, and
there was 3 weeks of no reply from you.
The issues that exist will be dealed with. Feel free to create tasks if
you want :)
2019-02-12 12:34:30 -08:00
|
|
|
[[A mixin that implements standard functions for command lines.
|
|
|
|
|
2019-09-02 07:24:26 -07:00
|
|
|
This object parses the command line that gets passed, later the object can be accessed via accessor or the string
|
|
|
|
directly.
|
Revert "Revert command line array object because it's broken by design"
This reverts commit a57c7f751023fe1d1edeabbf8683574ac7497e5e.
I pretty much hate to just revert your revert, but you failed to read my
replies, and failed to understand what i was talking about.
And YES we talked at fosdem about the platform issue, and do you
remember my answer, that back in time this might be the case, today is
different freebsd suppoerts setenv, and for windows we have a setenv
implementation in evil. And yes, vtorri also created a issue how bad and
evil this commit is, however, i still fail to see the issue since setenv
unsetenv and clearenv usages are taken as needed. (T7693)
The ownership question is answered in
https://phab.enlightenment.org/D7516#137367.
Can we please get into a state of technical discussions, and not *oh
shit, i am going to revert this* this has been in review for a long
time, a lots of people have tested it, we discussed things on it, and
there was 3 weeks of no reply from you.
The issues that exist will be dealed with. Feel free to create tasks if
you want :)
2019-02-12 12:34:30 -08:00
|
|
|
]]
|
|
|
|
methods {
|
|
|
|
@property command {
|
|
|
|
[[ A commandline that encodes arguments in a command string.
|
|
|
|
This command is unix shell-style, thus whitespace separates
|
|
|
|
arguments unless escaped. Also a semi-colon ';', ampersand
|
|
|
|
'&', pipe/bar '|', hash '#', bracket, square brace, brace
|
|
|
|
character ('(', ')', '[', ']', '{', '}'), exclamation
|
|
|
|
mark '!', backquote '`', greator or less than ('>' '<')
|
|
|
|
character unless escaped or in quotes would cause
|
|
|
|
args_count/value to not be generated properly, because
|
|
|
|
it would force complex shell interpretation which
|
|
|
|
will not be supported in evaluating the arg_count/value
|
|
|
|
information, but the final shell may interpret this if this
|
|
|
|
is executed via a command-line shell. To not be a complex
|
|
|
|
shell command, it should be simple with paths, options
|
|
|
|
and variable expansions, but nothing more complex involving
|
|
|
|
the above unescaped characters.
|
|
|
|
|
|
|
|
"cat -option /path/file"
|
|
|
|
"cat 'quoted argument'"
|
|
|
|
"cat ~/path/escaped\ argument"
|
|
|
|
"/bin/cat escaped\ argument $VARIABLE"
|
|
|
|
etc.
|
|
|
|
|
|
|
|
It should not try and use "complex shell features" if you
|
|
|
|
want the arg_count and arg_value set to be correct after
|
|
|
|
setting the command string. For example none of:
|
|
|
|
|
|
|
|
"VAR=x /bin/command && /bin/othercommand >& /dev/null"
|
|
|
|
"VAR=x /bin/command `/bin/othercommand` | /bin/cmd2 && cmd3 &"
|
|
|
|
etc.
|
|
|
|
|
|
|
|
If you set the command the arg_count/value property contents
|
|
|
|
can change and be completely re-evaluated by parsing the
|
|
|
|
command string into an argument array set along with
|
|
|
|
interpreting escapes back into individual argument strings.
|
|
|
|
]]
|
|
|
|
get {
|
|
|
|
|
|
|
|
}
|
|
|
|
values {
|
|
|
|
commandline : string;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
command_access {
|
|
|
|
[[ Get the accessor which enables access to each argument that got passed to this object. ]]
|
2019-11-21 23:29:27 -08:00
|
|
|
return : accessor<stringshare> @move;
|
Revert "Revert command line array object because it's broken by design"
This reverts commit a57c7f751023fe1d1edeabbf8683574ac7497e5e.
I pretty much hate to just revert your revert, but you failed to read my
replies, and failed to understand what i was talking about.
And YES we talked at fosdem about the platform issue, and do you
remember my answer, that back in time this might be the case, today is
different freebsd suppoerts setenv, and for windows we have a setenv
implementation in evil. And yes, vtorri also created a issue how bad and
evil this commit is, however, i still fail to see the issue since setenv
unsetenv and clearenv usages are taken as needed. (T7693)
The ownership question is answered in
https://phab.enlightenment.org/D7516#137367.
Can we please get into a state of technical discussions, and not *oh
shit, i am going to revert this* this has been in review for a long
time, a lots of people have tested it, we discussed things on it, and
there was 3 weeks of no reply from you.
The issues that exist will be dealed with. Feel free to create tasks if
you want :)
2019-02-12 12:34:30 -08:00
|
|
|
}
|
|
|
|
@property command_array {
|
|
|
|
[[ Use an array to fill this object
|
|
|
|
|
|
|
|
Every element of a string is a argument.
|
|
|
|
]]
|
|
|
|
set {
|
|
|
|
return : bool; [[On success $true, $false otherwise]]
|
|
|
|
}
|
|
|
|
values {
|
2019-09-06 08:01:05 -07:00
|
|
|
array : array<stringshare @move> @move; [[An array where every array field is an argument]]
|
Revert "Revert command line array object because it's broken by design"
This reverts commit a57c7f751023fe1d1edeabbf8683574ac7497e5e.
I pretty much hate to just revert your revert, but you failed to read my
replies, and failed to understand what i was talking about.
And YES we talked at fosdem about the platform issue, and do you
remember my answer, that back in time this might be the case, today is
different freebsd suppoerts setenv, and for windows we have a setenv
implementation in evil. And yes, vtorri also created a issue how bad and
evil this commit is, however, i still fail to see the issue since setenv
unsetenv and clearenv usages are taken as needed. (T7693)
The ownership question is answered in
https://phab.enlightenment.org/D7516#137367.
Can we please get into a state of technical discussions, and not *oh
shit, i am going to revert this* this has been in review for a long
time, a lots of people have tested it, we discussed things on it, and
there was 3 weeks of no reply from you.
The issues that exist will be dealed with. Feel free to create tasks if
you want :)
2019-02-12 12:34:30 -08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
@property command_string {
|
2019-09-02 07:24:26 -07:00
|
|
|
[[Use a string to fill this object
|
Revert "Revert command line array object because it's broken by design"
This reverts commit a57c7f751023fe1d1edeabbf8683574ac7497e5e.
I pretty much hate to just revert your revert, but you failed to read my
replies, and failed to understand what i was talking about.
And YES we talked at fosdem about the platform issue, and do you
remember my answer, that back in time this might be the case, today is
different freebsd suppoerts setenv, and for windows we have a setenv
implementation in evil. And yes, vtorri also created a issue how bad and
evil this commit is, however, i still fail to see the issue since setenv
unsetenv and clearenv usages are taken as needed. (T7693)
The ownership question is answered in
https://phab.enlightenment.org/D7516#137367.
Can we please get into a state of technical discussions, and not *oh
shit, i am going to revert this* this has been in review for a long
time, a lots of people have tested it, we discussed things on it, and
there was 3 weeks of no reply from you.
The issues that exist will be dealed with. Feel free to create tasks if
you want :)
2019-02-12 12:34:30 -08:00
|
|
|
|
2019-09-02 07:24:26 -07:00
|
|
|
The string will be split at every unescaped ' ', every resulting substring will be a new argument to the
|
|
|
|
command line.
|
Revert "Revert command line array object because it's broken by design"
This reverts commit a57c7f751023fe1d1edeabbf8683574ac7497e5e.
I pretty much hate to just revert your revert, but you failed to read my
replies, and failed to understand what i was talking about.
And YES we talked at fosdem about the platform issue, and do you
remember my answer, that back in time this might be the case, today is
different freebsd suppoerts setenv, and for windows we have a setenv
implementation in evil. And yes, vtorri also created a issue how bad and
evil this commit is, however, i still fail to see the issue since setenv
unsetenv and clearenv usages are taken as needed. (T7693)
The ownership question is answered in
https://phab.enlightenment.org/D7516#137367.
Can we please get into a state of technical discussions, and not *oh
shit, i am going to revert this* this has been in review for a long
time, a lots of people have tested it, we discussed things on it, and
there was 3 weeks of no reply from you.
The issues that exist will be dealed with. Feel free to create tasks if
you want :)
2019-02-12 12:34:30 -08:00
|
|
|
]]
|
|
|
|
set {
|
|
|
|
return : bool; [[On success $true, $false otherwise]]
|
|
|
|
}
|
|
|
|
values {
|
|
|
|
str : string; [[A command in form of a string]]
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
2019-09-10 09:29:01 -07:00
|
|
|
implements {
|
|
|
|
Efl.Object.destructor;
|
|
|
|
}
|
Revert "Revert command line array object because it's broken by design"
This reverts commit a57c7f751023fe1d1edeabbf8683574ac7497e5e.
I pretty much hate to just revert your revert, but you failed to read my
replies, and failed to understand what i was talking about.
And YES we talked at fosdem about the platform issue, and do you
remember my answer, that back in time this might be the case, today is
different freebsd suppoerts setenv, and for windows we have a setenv
implementation in evil. And yes, vtorri also created a issue how bad and
evil this commit is, however, i still fail to see the issue since setenv
unsetenv and clearenv usages are taken as needed. (T7693)
The ownership question is answered in
https://phab.enlightenment.org/D7516#137367.
Can we please get into a state of technical discussions, and not *oh
shit, i am going to revert this* this has been in review for a long
time, a lots of people have tested it, we discussed things on it, and
there was 3 weeks of no reply from you.
The issues that exist will be dealed with. Feel free to create tasks if
you want :)
2019-02-12 12:34:30 -08:00
|
|
|
}
|