pub struct Args {
pub debug: bool,
pub cmd: Option<Command>,
pub old: Option<PathBuf>,
pub new: Option<PathBuf>,
pub file_type: Option<String>,
pub config: Option<PathBuf>,
pub color_output: ColorOutputPolicy,
pub no_config: bool,
pub renderer: Option<String>,
}
Fields§
§debug: bool
Print debug output
This will print debug logs at the trace level. This is useful for debugging and bug reports should contain debug logging info.
cmd: Option<Command>
Run a subcommand that doesn’t perform a diff. Valid options are: “list”, “dump_default_config”, and “build_info”.
-
“list” lists all of the filetypes/languages that this program was compiled with support for
-
“dump_default_config” will dump the default configuration to stdout
-
“build_info” prints extended build information
old: Option<PathBuf>
The first file to compare against
Text that is in this file but is not in the new file is considered a deletion
new: Option<PathBuf>
The file that the old file is compared against
Text that is in this file but is not in the old file is considered an addition
file_type: Option<String>
Manually set the file type for the given files
This will dictate which parser is used with the difftool. You can list all of the valid
file type strings with diffsitter --cmd list
config: Option<PathBuf>
Use the config provided at the given path
By default, diffsitter attempts to find the config at $XDG_CONFIG_HOME/diffsitter.json5
.
On Windows the app will look in the standard config path.
color_output: ColorOutputPolicy
Set the color output policy. Valid values are: “auto”, “on”, “off”.
“auto” will automatically detect whether colors should be applied by trying to determine whether the process is outputting to a TTY. “on” will enable output and “off” will disable color output regardless of whether the process detects a TTY.
no_config: bool
Ignore any config files and use the default config
This will cause the app to ignore any configs and all config values will use the their default settings.
renderer: Option<String>
Specify which renderer tag to use.
If no option is supplied then this will fall back to the default renderer.
Trait Implementations§
Source§impl Args for Args
impl Args for Args
Source§fn augment_args<'b>(__clap_app: Command) -> Command
fn augment_args<'b>(__clap_app: Command) -> Command
Source§fn augment_args_for_update<'b>(__clap_app: Command) -> Command
fn augment_args_for_update<'b>(__clap_app: Command) -> Command
Command
so it can instantiate self
via
FromArgMatches::update_from_arg_matches_mut
Read moreSource§impl CommandFactory for Args
impl CommandFactory for Args
Source§impl FromArgMatches for Args
impl FromArgMatches for Args
Source§fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
Source§fn from_arg_matches_mut(
__clap_arg_matches: &mut ArgMatches,
) -> Result<Self, Error>
fn from_arg_matches_mut( __clap_arg_matches: &mut ArgMatches, ) -> Result<Self, Error>
Source§fn update_from_arg_matches(
&mut self,
__clap_arg_matches: &ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches( &mut self, __clap_arg_matches: &ArgMatches, ) -> Result<(), Error>
ArgMatches
to self
.Source§fn update_from_arg_matches_mut(
&mut self,
__clap_arg_matches: &mut ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches_mut( &mut self, __clap_arg_matches: &mut ArgMatches, ) -> Result<(), Error>
ArgMatches
to self
.