Struct gix_command::shebang::Data
source · pub struct Data {
pub interpreter: PathBuf,
pub args: Vec<OsString>,
}
Expand description
Shebang information as parsed from a buffer that should contain at least one line.
§Deviation
According to the shebang documentation, it will only consider the path of the executable, along with the arguments as the consecutive portion after the space that separates them. Argument splitting would then have to be done elsewhere, probably in the kernel.
To make that work without the kernel, we perform the splitting while Git just ignores options. For now it seems more compatible to not ignore options, but if it is important this could be changed.
Fields§
§interpreter: PathBuf
The interpreter to run.
args: Vec<OsString>
The remainder of the line past the space after interpreter
, without leading or trailing whitespace,
as pre-split arguments just like a shell would do it.
Note that we accept that illformed UTF-8 will prevent argument splitting.
Trait Implementations§
source§impl Ord for Data
impl Ord for Data
source§impl PartialEq for Data
impl PartialEq for Data
source§impl PartialOrd for Data
impl PartialOrd for Data
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read more