Struct unshare::Style[][src]

pub struct Style { /* fields omitted */ }

This is a builder for various settings of how command may be printed

Use format!("{}", cmd.display(style)) to actually print a command.

Methods

impl Style
[src]

Create a new style object that matches to how fmt::Debug works for the command

Create a simple clean user-friendly display of the command

Note: this kind of pretty-printing omit many important parts of command and may be ambiguous.

Toggle printing of environment

When false is passed we only show environ[12], i.e. a number of environment variables. Default is true for Style::debug constructor.

This method does nothing when using Style::short construtor

Toggle printing of full path to the executable

By default we don't print full executable path in Style::short mode.

Note: if this flag is disabled (default) we only show a name from arg0, instead of executable path. When flag is enabled, the arg0 is shown alongside with executable path in parethesis if the values differ.

This method does nothing when using Style::debug constructor

Trait Implementations

impl Clone for Style
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Debug for Style
[src]

Formats the value using the given formatter. Read more

Auto Trait Implementations

impl Send for Style

impl Sync for Style