diff --git a/README.md b/README.md
index fe1791b8c..c2bc42eb9 100644
--- a/README.md
+++ b/README.md
@@ -18,7 +18,7 @@ SPDX-License-Identifier: EUPL-1.2
[Available for MacOS, Linux, & Windows](https://www.warp.dev/eza)
-
+
# eza
A modern replacement for ls.
@@ -113,6 +113,7 @@ eza’s options are almost, but not quite, entirely unlike `ls`’s. Quick overv
- **--hyperlink**: display entries as hyperlinks
- **--absolute=(mode)**: display entries with their absolute path (on, follow, off)
- **-w**, **--width=(columns)**: set screen width in columns
+- **--spacing=(columns)**: set the number of spaces between columns
@@ -203,7 +204,7 @@ precedence for backwards compatibility.
#### **New** Pre-made themes
Check out the themes available in the official [eza-themes](https://github.com/eza-community/eza-themes) repository, or contribute your own.
-An example theme file is available in `docs/theme.yml`, and needs to either be placed in a directory specified by the
+An example theme file is available in `docs/theme.yml`, and needs to either be placed in a directory specified by the
environment variable `EZA_CONFIG_DIR`, or will looked for by default in `$XDG_CONFIG_HOME/eza`.
Full details are available on the [man page](https://github.com/eza-community/eza/tree/main/man/eza_colors-explanation.5.md) and an example theme file is included [here](https://github.com/eza-community/eza/tree/main/docs/theme.yml)
@@ -213,10 +214,10 @@ Full details are available on the [man page](https://github.com/eza-community/ez
# Hacking on eza
-If you wanna contribute to eza, firstly, you're expected to follow our
-[code of conduct](https://github.com/eza-community/eza/blob/main/CODE_OF_CONDUCT.md).
+If you wanna contribute to eza, firstly, you're expected to follow our
+[code of conduct](https://github.com/eza-community/eza/blob/main/CODE_OF_CONDUCT.md).
After having understood the code of conduct, you can have a look at our
-[CONTRIBUTING.md](https://github.com/eza-community/eza/blob/main/CONTRIBUTING.md)
+[CONTRIBUTING.md](https://github.com/eza-community/eza/blob/main/CONTRIBUTING.md)
for more info about actual hacking.
[](https://star-history.com/#eza-community/eza&Date)
diff --git a/completions/fish/eza.fish b/completions/fish/eza.fish
index e3488239f..312624fa7 100644
--- a/completions/fish/eza.fish
+++ b/completions/fish/eza.fish
@@ -51,10 +51,11 @@ complete -c eza -l group-directories-first -d "Sort directories before other fil
complete -c eza -l group-directories-last -d "Sort directories after other files"
complete -c eza -l git-ignore -d "Ignore files mentioned in '.gitignore'"
complete -c eza -s a -l all -d "Show hidden and 'dot' files. Use this twice to also show the '.' and '..' directories"
-complete -c eza -s A -l almost-all -d "Equivalent to --all; included for compatibility with `ls -A`"
+complete -c eza -s A -l almost-all -d "Equivalent to --all; included for compatibility with $(ls -A)"
complete -c eza -s d -l treat-dirs-as-files -d "List directories like regular files"
complete -c eza -s L -l level -d "Limit the depth of recursion" -x -a "1 2 3 4 5 6 7 8 9"
complete -c eza -s w -l width -d "Limits column output of grid, 0 implies auto-width"
+complete -c eza -l spacing -d "Set the space between columns"
complete -c eza -s r -l reverse -d "Reverse the sort order"
complete -c eza -s s -l sort -d "Which field to sort by" -x -a "
accessed\t'Sort by file accessed time'
diff --git a/completions/nush/eza.nu b/completions/nush/eza.nu
index 3830fd9f1..7e49d0e81 100644
--- a/completions/nush/eza.nu
+++ b/completions/nush/eza.nu
@@ -28,6 +28,7 @@ export extern "eza" [
--treat-dirs-as-files(-d) # List directories like regular files
--level(-L): string # Limit the depth of recursion
--width(-w) # Limits column output of grid, 0 implies auto-width
+ --spacing # Space between columns in grid mode
--reverse(-r) # Reverse the sort order
--sort(-s) # Which field to sort by
--only-dirs(-D) # List only directories
diff --git a/completions/zsh/_eza b/completions/zsh/_eza
index 9636fe254..5fc4f72c8 100644
--- a/completions/zsh/_eza
+++ b/completions/zsh/_eza
@@ -40,6 +40,7 @@ __eza() {
{-f,--only-files}"[List only files]" \
{-L,--level}"+[Limit the depth of recursion]" \
{-w,--width}"+[Limits column output of grid, 0 implies auto-width]" \
+ --spacing"+[Set the space between columns]" \
{-r,--reverse}"[Reverse the sort order]" \
{-s,--sort}="[Which field to sort by]:(sort field):(accessed age changed created date extension Extension filename Filename inode modified oldest name Name newest none size time type)" \
{-I,--ignore-glob}"[Ignore files that match these glob patterns]" \
diff --git a/man/eza.1.md b/man/eza.1.md
index 63201c541..4ddfae834 100644
--- a/man/eza.1.md
+++ b/man/eza.1.md
@@ -129,6 +129,9 @@ The default value is ‘`automatic`’.
`-w`, `--width=COLS`
: Set screen width in columns.
+`--spacing=COLS`
+: Set the number of spaces between columns.
+
FILTERING AND SORTING OPTIONS
=============================
@@ -356,7 +359,7 @@ Specifies the minimum luminance to use when color-scale is active. It's value ca
If set, automates the same behavior as using `--icons` or `--icons=auto`. Useful for if you always want to have icons enabled.
-Any explicit use of the `--icons=WHEN` flag overrides this behavior.
+Any explicit use of the `--icons=WHEN` flag overrides this behavior.
## `EZA_STDIN_SEPARATOR`
diff --git a/src/options/error.rs b/src/options/error.rs
index 8083ffbba..3369b1331 100644
--- a/src/options/error.rs
+++ b/src/options/error.rs
@@ -45,6 +45,9 @@ pub enum OptionsError {
/// A glob ignore was given that failed to be parsed as a pattern.
FailedGlobPattern(String),
+
+ /// A numeric option was given that contained a negative number.
+ NegativeNumber(&'static Arg, String),
}
/// The source of a string that failed to be parsed as a number.
@@ -102,6 +105,7 @@ impl fmt::Display for OptionsError {
Self::TreeAllAll => write!(f, "Option --tree is useless given --all --all"),
Self::FailedParse(s, n, e) => write!(f, "Value {s:?} not valid for {n}: {e}"),
Self::FailedGlobPattern(ref e) => write!(f, "Failed to parse glob pattern: {e}"),
+ Self::NegativeNumber(a, n) => write!(f, "Value {n:?} not valid for {a}: Negative numbers are not allowed"),
};
}
}
diff --git a/src/options/flags.rs b/src/options/flags.rs
index 53eef54cb..2c509e71f 100644
--- a/src/options/flags.rs
+++ b/src/options/flags.rs
@@ -21,6 +21,7 @@ pub static TREE: Arg = Arg { short: Some(b'T'), long: "tree",
pub static CLASSIFY: Arg = Arg { short: Some(b'F'), long: "classify", takes_value: TakesValue::Optional(Some(WHEN), "auto") };
pub static DEREF_LINKS: Arg = Arg { short: Some(b'X'), long: "dereference", takes_value: TakesValue::Forbidden };
pub static WIDTH: Arg = Arg { short: Some(b'w'), long: "width", takes_value: TakesValue::Necessary(None) };
+pub static SPACING:Arg = Arg { short: None, long: "spacing", takes_value: TakesValue::Necessary(None) };
pub static NO_QUOTES: Arg = Arg { short: None, long: "no-quotes", takes_value: TakesValue::Forbidden };
pub static ABSOLUTE: Arg = Arg { short: None, long: "absolute", takes_value: TakesValue::Optional(Some(ABSOLUTE_MODES), "on") };
pub static FOLLOW_LINKS: Arg = Arg { short: None, long: "follow-symlinks", takes_value: TakesValue::Forbidden };
@@ -103,7 +104,7 @@ pub static ALL_ARGS: Args = Args(&[
&ONE_LINE, &LONG, &GRID, &ACROSS, &RECURSE, &TREE, &CLASSIFY, &DEREF_LINKS, &FOLLOW_LINKS,
&COLOR, &COLOUR, &COLOR_SCALE, &COLOUR_SCALE, &COLOR_SCALE_MODE, &COLOUR_SCALE_MODE,
- &WIDTH, &NO_QUOTES, &ABSOLUTE,
+ &WIDTH, &NO_QUOTES, &ABSOLUTE, &SPACING,
&ALL, &ALMOST_ALL, &TREAT_DIRS_AS_FILES, &LIST_DIRS, &LEVEL, &REVERSE, &SORT, &DIRS_FIRST, &DIRS_LAST,
&IGNORE_GLOB, &GIT_IGNORE, &ONLY_DIRS, &ONLY_FILES,
diff --git a/src/options/help.rs b/src/options/help.rs
index 69070dbaf..2c5d51d66 100644
--- a/src/options/help.rs
+++ b/src/options/help.rs
@@ -35,6 +35,7 @@ DISPLAY OPTIONS
--absolute display entries with their absolute path (on, follow, off)
--follow-symlinks drill down into symbolic links that point to directories
-w, --width COLS set screen width in columns
+ --spacing set the space between columns (0 for no spacing)
FILTERING AND SORTING OPTIONS
@@ -88,7 +89,7 @@ LONG VIEW OPTIONS
--no-filesize suppress the filesize field
--no-user suppress the user field
--no-time suppress the time field
- --stdin read file names from stdin, one per line or other separator
+ --stdin read file names from stdin, one per line or other separator
specified in environment";
static GIT_VIEW_HELP: &str = " \
diff --git a/src/options/view.rs b/src/options/view.rs
index 18aedaf8d..8d8b768f2 100644
--- a/src/options/view.rs
+++ b/src/options/view.rs
@@ -16,7 +16,7 @@ use crate::output::table::{
Columns, FlagsFormat, GroupFormat, Options as TableOptions, SizeFormat, TimeTypes, UserFormat,
};
use crate::output::time::TimeFormat;
-use crate::output::{details, grid, Mode, TerminalWidth, View};
+use crate::output::{details, grid, Mode, SpacingBetweenColumns, SpacingMode, TerminalWidth, View};
impl View {
pub fn deduce(matches: &MatchedFlags<'_>, vars: &V) -> Result {
@@ -27,9 +27,12 @@ impl View {
let follow_links = matches.has(&flags::FOLLOW_LINKS)?;
let total_size = matches.has(&flags::TOTAL_SIZE)?;
let file_style = FileStyle::deduce(matches, vars, is_tty)?;
+ let space_between_columns = SpacingBetweenColumns::deduce(matches)?;
+
Ok(Self {
mode,
width,
+ space_between_columns,
file_style,
deref_links,
follow_links,
@@ -61,10 +64,13 @@ impl Mode {
let Some(flag) = flag else {
Self::strict_check_long_flags(matches)?;
+
if is_tty {
- let grid = grid::Options::deduce(matches)?;
+ let spacing = SpacingBetweenColumns::deduce(matches)?;
+ let grid = grid::Options::deduce(matches, spacing.spaces(SpacingMode::Grid))?;
return Ok(Self::Grid(grid));
}
+
return Ok(Self::Lines);
};
@@ -73,7 +79,9 @@ impl Mode {
|| (flag.matches(&flags::GRID) && matches.has(&flags::LONG)?)
{
let _ = matches.has(&flags::LONG)?;
- let details = details::Options::deduce_long(matches, vars)?;
+ let spacing = SpacingBetweenColumns::deduce(matches)?;
+ let details =
+ details::Options::deduce_long(matches, vars, spacing.spaces(SpacingMode::Details))?;
let flag =
matches.has_where_any(|f| f.matches(&flags::GRID) || f.matches(&flags::TREE));
@@ -96,7 +104,9 @@ impl Mode {
if flag.matches(&flags::TREE) {
let _ = matches.has(&flags::TREE)?;
- let details = details::Options::deduce_tree(matches, vars)?;
+ let spacing = SpacingBetweenColumns::deduce(matches)?;
+ let details =
+ details::Options::deduce_tree(matches, vars, spacing.spaces(SpacingMode::Details))?;
return Ok(Self::Details(details));
}
@@ -105,7 +115,8 @@ impl Mode {
return Ok(Self::Lines);
}
- let grid = grid::Options::deduce(matches)?;
+ let spacing = SpacingBetweenColumns::deduce(matches)?;
+ let grid = grid::Options::deduce(matches, spacing.spaces(SpacingMode::Grid))?;
Ok(Self::Grid(grid))
}
@@ -149,9 +160,10 @@ impl Mode {
}
impl grid::Options {
- fn deduce(matches: &MatchedFlags<'_>) -> Result {
+ fn deduce(matches: &MatchedFlags<'_>, spacing: usize) -> Result {
let grid = grid::Options {
across: matches.has(&flags::ACROSS)?,
+ spacing,
};
Ok(grid)
@@ -159,7 +171,11 @@ impl grid::Options {
}
impl details::Options {
- fn deduce_tree(matches: &MatchedFlags<'_>, vars: &V) -> Result {
+ fn deduce_tree(
+ matches: &MatchedFlags<'_>,
+ vars: &V,
+ spacing: usize,
+ ) -> Result {
let details = details::Options {
table: None,
header: false,
@@ -168,12 +184,17 @@ impl details::Options {
mounts: matches.has(&flags::MOUNTS)?,
color_scale: ColorScaleOptions::deduce(matches, vars)?,
follow_links: matches.has(&flags::FOLLOW_LINKS)?,
+ spacing,
};
Ok(details)
}
- fn deduce_long(matches: &MatchedFlags<'_>, vars: &V) -> Result {
+ fn deduce_long(
+ matches: &MatchedFlags<'_>,
+ vars: &V,
+ spacing: usize,
+ ) -> Result {
if matches.is_strict() {
if matches.has(&flags::ACROSS)? && !matches.has(&flags::GRID)? {
return Err(OptionsError::Useless(&flags::ACROSS, true, &flags::LONG));
@@ -190,6 +211,7 @@ impl details::Options {
mounts: matches.has(&flags::MOUNTS)?,
color_scale: ColorScaleOptions::deduce(matches, vars)?,
follow_links: matches.has(&flags::FOLLOW_LINKS)?,
+ spacing,
})
}
}
@@ -225,6 +247,33 @@ impl TerminalWidth {
}
}
+impl SpacingBetweenColumns {
+ fn deduce(matches: &MatchedFlags<'_>) -> Result {
+ if let Some(spacing) = matches.get(&flags::SPACING)? {
+ let arg_str = spacing.to_string_lossy();
+ match arg_str.parse::() {
+ Ok(n) => {
+ use std::cmp::Ordering;
+ match n.cmp(&0) {
+ Ordering::Less => Err(OptionsError::NegativeNumber(
+ &flags::SPACING,
+ arg_str.to_string(),
+ )),
+ Ordering::Equal => Ok(Self::Set(0)),
+ Ordering::Greater => Ok(Self::Set(n as usize)),
+ }
+ }
+ Err(e) => {
+ let source = NumberSource::Arg(&flags::SPACING);
+ Err(OptionsError::FailedParse(arg_str.to_string(), source, e))
+ }
+ }
+ } else {
+ Ok(Self::Default)
+ }
+ }
+}
+
impl RowThreshold {
fn deduce(vars: &V) -> Result {
if let Some(columns) = vars
@@ -560,6 +609,7 @@ mod test {
&flags::ONE_LINE,
&flags::TREE,
&flags::NUMERIC,
+ &flags::SPACING,
];
#[allow(unused_macro_rules)]
@@ -840,4 +890,20 @@ mod test {
test_mode!(og: <- ["--oneline", "--grid"], None; Both => like Ok(Mode::Grid(_)));
test_mode!(tg: <- ["--tree", "--grid"], None; Both => like Ok(Mode::Grid(_)));
}
+
+ mod spacing_between_columns {
+ use super::*;
+
+ test!(default: SpacingBetweenColumns <- []; Both => like Ok(SpacingBetweenColumns::Default));
+ test!(zero: SpacingBetweenColumns <- ["--spacing", "0"]; Both => like Ok(SpacingBetweenColumns::Set(0)));
+ test!(one: SpacingBetweenColumns <- ["--spacing", "1"]; Both => like Ok(SpacingBetweenColumns::Set(1)));
+ test!(three: SpacingBetweenColumns <- ["--spacing", "3"]; Both => like Ok(SpacingBetweenColumns::Set(3)));
+ test!(five: SpacingBetweenColumns <- ["--spacing", "5"]; Both => like Ok(SpacingBetweenColumns::Set(5)));
+ test!(large: SpacingBetweenColumns <- ["--spacing", "100"]; Both => like Ok(SpacingBetweenColumns::Set(100)));
+ test!(negative: SpacingBetweenColumns <- ["--spacing", "-1"]; Both => like Err(OptionsError::NegativeNumber(_, _)));
+ test!(negative_zero: SpacingBetweenColumns <- ["--spacing", "-0"]; Both => like Ok(SpacingBetweenColumns::Set(0)));
+ test!(invalid: SpacingBetweenColumns <- ["--spacing", "abc"]; Both => like Err(OptionsError::FailedParse(_, _, _)));
+ test!(invalid_float: SpacingBetweenColumns <- ["--spacing", "1.5"]; Both => like Err(OptionsError::FailedParse(_, _, _)));
+ test!(empty: SpacingBetweenColumns <- ["--spacing", ""]; Both => like Err(OptionsError::FailedParse(_, _, _)));
+ }
}
diff --git a/src/output/details.rs b/src/output/details.rs
index 330ece774..af3020b21 100644
--- a/src/output/details.rs
+++ b/src/output/details.rs
@@ -111,7 +111,7 @@ pub struct Options {
/// Whether to show a header line or not.
pub header: bool,
- /// Whether to show each file’s extended attributes.
+ /// Whether to show each file's extended attributes.
pub xattr: bool,
/// Whether to show each file's security attribute.
@@ -124,6 +124,9 @@ pub struct Options {
/// Whether to drill down into symbolic links that point to directories
pub follow_links: bool,
+
+ /// The spacing between columns in the table
+ pub spacing: usize,
}
pub struct Render<'a> {
@@ -192,7 +195,13 @@ impl<'a> Render<'a> {
(None, _) => { /* Keep Git how it is */ }
}
- let mut table = Table::new(table, self.git, self.theme, self.git_repos);
+ let mut table = Table::new(
+ table,
+ self.git,
+ self.theme,
+ self.opts.spacing,
+ self.git_repos,
+ );
if self.opts.header {
let header = table.header_row();
diff --git a/src/output/grid.rs b/src/output/grid.rs
index 8c3e9eef3..ab3a3f9f7 100644
--- a/src/output/grid.rs
+++ b/src/output/grid.rs
@@ -16,6 +16,7 @@ use crate::theme::Theme;
#[derive(PartialEq, Eq, Debug, Copy, Clone)]
pub struct Options {
pub across: bool,
+ pub spacing: usize,
}
impl Options {
@@ -57,7 +58,7 @@ impl Render<'_> {
let grid = Grid::new(
cells,
GridOptions {
- filling: Filling::Spaces(2),
+ filling: Filling::Spaces(self.opts.spacing),
direction: self.opts.direction(),
width: self.console_width,
},
diff --git a/src/output/grid_details.rs b/src/output/grid_details.rs
index 32d999734..0f6346bb2 100644
--- a/src/output/grid_details.rs
+++ b/src/output/grid_details.rs
@@ -256,7 +256,13 @@ impl<'a> Render<'a> {
(None, _) => { /* Keep Git how it is */ }
}
- let mut table = Table::new(options, self.git, self.theme, self.git_repos);
+ let mut table = Table::new(
+ options,
+ self.git,
+ self.theme,
+ self.details.spacing,
+ self.git_repos,
+ );
// The header row will be printed separately, but it should be
// considered for the width calculations.
diff --git a/src/output/mod.rs b/src/output/mod.rs
index 666c20706..403725c5e 100644
--- a/src/output/mod.rs
+++ b/src/output/mod.rs
@@ -28,6 +28,7 @@ mod tree;
pub struct View {
pub mode: Mode,
pub width: TerminalWidth,
+ pub space_between_columns: SpacingBetweenColumns,
pub file_style: file_name::Options,
pub deref_links: bool,
pub follow_links: bool,
@@ -81,3 +82,44 @@ impl TerminalWidth {
};
}
}
+
+/// The default spacing mode for different view types.
+#[derive(PartialEq, Eq, Debug, Copy, Clone)]
+pub enum SpacingMode {
+ /// Grid mode default (2 spaces)
+ Grid,
+ /// Details/tree mode default (1 space)
+ Details,
+}
+
+impl SpacingMode {
+ /// Get the default number of spaces for this mode.
+ #[must_use]
+ pub fn default_spaces(self) -> usize {
+ match self {
+ Self::Grid => 2,
+ Self::Details => 1,
+ }
+ }
+}
+
+/// The spacing between columns requested by the user.
+#[derive(PartialEq, Eq, Debug, Copy, Clone)]
+pub enum SpacingBetweenColumns {
+ /// The user requested this specific number of spaces.
+ Set(usize),
+ /// Use the default spacing based on the current mode.
+ Default,
+}
+
+impl SpacingBetweenColumns {
+ /// Get the actual number of spaces to use between columns.
+ /// Takes the spacing mode to determine the correct default.
+ #[must_use]
+ pub fn spaces(self, mode: SpacingMode) -> usize {
+ match self {
+ Self::Set(spaces) => spaces,
+ Self::Default => mode.default_spaces(),
+ }
+ }
+}
diff --git a/src/output/table.rs b/src/output/table.rs
index 3daa47257..f38115dc5 100644
--- a/src/output/table.rs
+++ b/src/output/table.rs
@@ -409,6 +409,7 @@ pub struct Table<'a> {
theme: &'a Theme,
env: &'a Environment,
widths: TableWidths,
+ spacing: usize,
time_format: TimeFormat,
size_format: SizeFormat,
#[cfg(unix)]
@@ -430,6 +431,7 @@ impl<'a> Table<'a> {
options: &'a Options,
git: Option<&'a GitCache>,
theme: &'a Theme,
+ spacing: usize,
git_repos: bool,
) -> Table<'a> {
let columns = options.columns.collect(git.is_some(), git_repos);
@@ -444,6 +446,7 @@ impl<'a> Table<'a> {
columns,
git,
env,
+ spacing,
time_format: options.time_format.clone(),
size_format: options.size_format,
#[cfg(unix)]
@@ -618,7 +621,7 @@ impl<'a> Table<'a> {
}
}
- cell.add_spaces(1);
+ cell.add_spaces(self.spacing);
}
cell
diff --git a/tests/cmd/spacing_default_all.stdout b/tests/cmd/spacing_default_all.stdout
new file mode 100644
index 000000000..419606b51
--- /dev/null
+++ b/tests/cmd/spacing_default_all.stdout
@@ -0,0 +1,22 @@
+a
+b
+c
+d
+dir-symlink -> vagrant/debug
+e
+exa
+f
+g
+h
+i
+image.jpg.img.c.rs.log.png
+index.svg
+j
+k
+l
+m
+n
+o
+p
+q
+vagrant
diff --git a/tests/cmd/spacing_default_all.toml b/tests/cmd/spacing_default_all.toml
new file mode 100644
index 000000000..eef02b766
--- /dev/null
+++ b/tests/cmd/spacing_default_all.toml
@@ -0,0 +1,2 @@
+bin.name = "eza"
+args = "tests/itest --grid"
diff --git a/tests/cmd/spacing_default_long.stdout b/tests/cmd/spacing_default_long.stdout
new file mode 100644
index 000000000..9d41a1721
--- /dev/null
+++ b/tests/cmd/spacing_default_long.stdout
@@ -0,0 +1,22 @@
+.rw-r--r--@ 0 marcosmoura 17 Jul 14:19 a
+.rw-r--r--@ 0 marcosmoura 17 Jul 14:19 b
+.rw-r--r--@ 0 marcosmoura 17 Jul 14:19 c
+.rw-r--r--@ 0 marcosmoura 17 Jul 14:19 d
+lrwxr-xr-x@ - marcosmoura 17 Jul 14:19 dir-symlink -> vagrant/debug
+.rw-r--r--@ 0 marcosmoura 17 Jul 14:19 e
+drwxr-xr-x@ - marcosmoura 17 Jul 14:19 exa
+.rw-r--r--@ 0 marcosmoura 17 Jul 14:19 f
+.rw-r--r--@ 0 marcosmoura 17 Jul 14:19 g
+.rw-r--r--@ 0 marcosmoura 17 Jul 14:19 h
+.rw-r--r--@ 0 marcosmoura 17 Jul 14:19 i
+.rw-r--r--@ 0 marcosmoura 17 Jul 14:19 image.jpg.img.c.rs.log.png
+.rw-r--r--@ 19 marcosmoura 17 Jul 14:19 index.svg
+.rw-r--r--@ 0 marcosmoura 17 Jul 14:19 j
+.rw-r--r--@ 0 marcosmoura 17 Jul 14:19 k
+.rw-r--r--@ 0 marcosmoura 17 Jul 14:19 l
+.rw-r--r--@ 0 marcosmoura 17 Jul 14:19 m
+.rw-r--r--@ 0 marcosmoura 17 Jul 14:19 n
+.rw-r--r--@ 0 marcosmoura 17 Jul 14:19 o
+.rw-r--r--@ 0 marcosmoura 17 Jul 14:19 p
+.rw-r--r--@ 0 marcosmoura 17 Jul 14:19 q
+drwxr-xr-x@ - marcosmoura 17 Jul 14:19 vagrant
diff --git a/tests/cmd/spacing_default_long.toml b/tests/cmd/spacing_default_long.toml
new file mode 100644
index 000000000..7de508467
--- /dev/null
+++ b/tests/cmd/spacing_default_long.toml
@@ -0,0 +1,2 @@
+bin.name = "eza"
+args = "tests/itest -l"
diff --git a/tests/cmd/spacing_default_long_all.stdout b/tests/cmd/spacing_default_long_all.stdout
new file mode 100644
index 000000000..9d41a1721
--- /dev/null
+++ b/tests/cmd/spacing_default_long_all.stdout
@@ -0,0 +1,22 @@
+.rw-r--r--@ 0 marcosmoura 17 Jul 14:19 a
+.rw-r--r--@ 0 marcosmoura 17 Jul 14:19 b
+.rw-r--r--@ 0 marcosmoura 17 Jul 14:19 c
+.rw-r--r--@ 0 marcosmoura 17 Jul 14:19 d
+lrwxr-xr-x@ - marcosmoura 17 Jul 14:19 dir-symlink -> vagrant/debug
+.rw-r--r--@ 0 marcosmoura 17 Jul 14:19 e
+drwxr-xr-x@ - marcosmoura 17 Jul 14:19 exa
+.rw-r--r--@ 0 marcosmoura 17 Jul 14:19 f
+.rw-r--r--@ 0 marcosmoura 17 Jul 14:19 g
+.rw-r--r--@ 0 marcosmoura 17 Jul 14:19 h
+.rw-r--r--@ 0 marcosmoura 17 Jul 14:19 i
+.rw-r--r--@ 0 marcosmoura 17 Jul 14:19 image.jpg.img.c.rs.log.png
+.rw-r--r--@ 19 marcosmoura 17 Jul 14:19 index.svg
+.rw-r--r--@ 0 marcosmoura 17 Jul 14:19 j
+.rw-r--r--@ 0 marcosmoura 17 Jul 14:19 k
+.rw-r--r--@ 0 marcosmoura 17 Jul 14:19 l
+.rw-r--r--@ 0 marcosmoura 17 Jul 14:19 m
+.rw-r--r--@ 0 marcosmoura 17 Jul 14:19 n
+.rw-r--r--@ 0 marcosmoura 17 Jul 14:19 o
+.rw-r--r--@ 0 marcosmoura 17 Jul 14:19 p
+.rw-r--r--@ 0 marcosmoura 17 Jul 14:19 q
+drwxr-xr-x@ - marcosmoura 17 Jul 14:19 vagrant
diff --git a/tests/cmd/spacing_default_long_all.toml b/tests/cmd/spacing_default_long_all.toml
new file mode 100644
index 000000000..1e4f17652
--- /dev/null
+++ b/tests/cmd/spacing_default_long_all.toml
@@ -0,0 +1,2 @@
+bin.name = "eza"
+args = "tests/itest -la"
diff --git a/tests/cmd/spacing_default_tree.stdout b/tests/cmd/spacing_default_tree.stdout
new file mode 100644
index 000000000..efea725d3
--- /dev/null
+++ b/tests/cmd/spacing_default_tree.stdout
@@ -0,0 +1,37 @@
+tests/itest
+├── a
+├── b
+├── c
+├── d
+├── dir-symlink -> vagrant/debug
+├── e
+├── exa
+│ ├── file.c -> djihisudjuhfius
+│ └── sssssssssssssssssssssssssggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggsssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss
+│ └── Makefile
+├── f
+├── g
+├── h
+├── i
+├── image.jpg.img.c.rs.log.png
+├── index.svg
+├── j
+├── k
+├── l
+├── m
+├── n
+├── o
+├── p
+├── q
+└── vagrant
+ ├── debug
+ │ ├── a
+ │ ├── symlink -> a
+ │ └── symlink-broken -> ./b
+ ├── dev
+ │ └── main.bf
+ └── log
+ ├── file.png
+ └── run
+ ├── run.log.text
+ └── sps.log.text
diff --git a/tests/cmd/spacing_default_tree.toml b/tests/cmd/spacing_default_tree.toml
new file mode 100644
index 000000000..62ec7172b
--- /dev/null
+++ b/tests/cmd/spacing_default_tree.toml
@@ -0,0 +1,2 @@
+bin.name = "eza"
+args = "tests/itest --tree"
diff --git a/tests/cmd/spacing_invalid_all.toml b/tests/cmd/spacing_invalid_all.toml
new file mode 100644
index 000000000..c3c54ad30
--- /dev/null
+++ b/tests/cmd/spacing_invalid_all.toml
@@ -0,0 +1,4 @@
+bin.name = "eza"
+args = "tests/itest --grid --spacing abc"
+assert.code = 3
+status.code = 3
diff --git a/tests/cmd/spacing_invalid_long.toml b/tests/cmd/spacing_invalid_long.toml
new file mode 100644
index 000000000..0140fb77d
--- /dev/null
+++ b/tests/cmd/spacing_invalid_long.toml
@@ -0,0 +1,4 @@
+bin.name = "eza"
+args = "tests/itest -l --spacing abc"
+assert.code = 3
+status.code = 3
diff --git a/tests/cmd/spacing_invalid_long_all.toml b/tests/cmd/spacing_invalid_long_all.toml
new file mode 100644
index 000000000..bce6d8bf8
--- /dev/null
+++ b/tests/cmd/spacing_invalid_long_all.toml
@@ -0,0 +1,4 @@
+bin.name = "eza"
+args = "tests/itest -la --spacing abc"
+assert.code = 3
+status.code = 3
diff --git a/tests/cmd/spacing_negative_all.toml b/tests/cmd/spacing_negative_all.toml
new file mode 100644
index 000000000..a0241d747
--- /dev/null
+++ b/tests/cmd/spacing_negative_all.toml
@@ -0,0 +1,4 @@
+bin.name = "eza"
+args = "tests/itest --grid --spacing -1"
+assert.code = 3
+status.code = 3
diff --git a/tests/cmd/spacing_negative_long.toml b/tests/cmd/spacing_negative_long.toml
new file mode 100644
index 000000000..1da521c12
--- /dev/null
+++ b/tests/cmd/spacing_negative_long.toml
@@ -0,0 +1,4 @@
+bin.name = "eza"
+args = "tests/itest -l --spacing -1"
+assert.code = 3
+status.code = 3
diff --git a/tests/cmd/spacing_negative_long_all.toml b/tests/cmd/spacing_negative_long_all.toml
new file mode 100644
index 000000000..3e6a8ac08
--- /dev/null
+++ b/tests/cmd/spacing_negative_long_all.toml
@@ -0,0 +1,4 @@
+bin.name = "eza"
+args = "tests/itest -la --spacing -1"
+assert.code = 3
+status.code = 3
diff --git a/tests/cmd/spacing_three_all.stdout b/tests/cmd/spacing_three_all.stdout
new file mode 100644
index 000000000..419606b51
--- /dev/null
+++ b/tests/cmd/spacing_three_all.stdout
@@ -0,0 +1,22 @@
+a
+b
+c
+d
+dir-symlink -> vagrant/debug
+e
+exa
+f
+g
+h
+i
+image.jpg.img.c.rs.log.png
+index.svg
+j
+k
+l
+m
+n
+o
+p
+q
+vagrant
diff --git a/tests/cmd/spacing_three_all.toml b/tests/cmd/spacing_three_all.toml
new file mode 100644
index 000000000..2a6575a25
--- /dev/null
+++ b/tests/cmd/spacing_three_all.toml
@@ -0,0 +1,2 @@
+bin.name = "eza"
+args = "tests/itest --grid --spacing 3"
diff --git a/tests/cmd/spacing_three_long.stdout b/tests/cmd/spacing_three_long.stdout
new file mode 100644
index 000000000..2be77a6f0
--- /dev/null
+++ b/tests/cmd/spacing_three_long.stdout
@@ -0,0 +1,22 @@
+.rw-r--r--@ 0 marcosmoura 17 Jul 14:19 a
+.rw-r--r--@ 0 marcosmoura 17 Jul 14:19 b
+.rw-r--r--@ 0 marcosmoura 17 Jul 14:19 c
+.rw-r--r--@ 0 marcosmoura 17 Jul 14:19 d
+lrwxr-xr-x@ - marcosmoura 17 Jul 14:19 dir-symlink -> vagrant/debug
+.rw-r--r--@ 0 marcosmoura 17 Jul 14:19 e
+drwxr-xr-x@ - marcosmoura 17 Jul 14:19 exa
+.rw-r--r--@ 0 marcosmoura 17 Jul 14:19 f
+.rw-r--r--@ 0 marcosmoura 17 Jul 14:19 g
+.rw-r--r--@ 0 marcosmoura 17 Jul 14:19 h
+.rw-r--r--@ 0 marcosmoura 17 Jul 14:19 i
+.rw-r--r--@ 0 marcosmoura 17 Jul 14:19 image.jpg.img.c.rs.log.png
+.rw-r--r--@ 19 marcosmoura 17 Jul 14:19 index.svg
+.rw-r--r--@ 0 marcosmoura 17 Jul 14:19 j
+.rw-r--r--@ 0 marcosmoura 17 Jul 14:19 k
+.rw-r--r--@ 0 marcosmoura 17 Jul 14:19 l
+.rw-r--r--@ 0 marcosmoura 17 Jul 14:19 m
+.rw-r--r--@ 0 marcosmoura 17 Jul 14:19 n
+.rw-r--r--@ 0 marcosmoura 17 Jul 14:19 o
+.rw-r--r--@ 0 marcosmoura 17 Jul 14:19 p
+.rw-r--r--@ 0 marcosmoura 17 Jul 14:19 q
+drwxr-xr-x@ - marcosmoura 17 Jul 14:19 vagrant
diff --git a/tests/cmd/spacing_three_long.toml b/tests/cmd/spacing_three_long.toml
new file mode 100644
index 000000000..a7ab7add5
--- /dev/null
+++ b/tests/cmd/spacing_three_long.toml
@@ -0,0 +1,2 @@
+bin.name = "eza"
+args = "tests/itest -l --spacing 3"
diff --git a/tests/cmd/spacing_three_long_all.stdout b/tests/cmd/spacing_three_long_all.stdout
new file mode 100644
index 000000000..2be77a6f0
--- /dev/null
+++ b/tests/cmd/spacing_three_long_all.stdout
@@ -0,0 +1,22 @@
+.rw-r--r--@ 0 marcosmoura 17 Jul 14:19 a
+.rw-r--r--@ 0 marcosmoura 17 Jul 14:19 b
+.rw-r--r--@ 0 marcosmoura 17 Jul 14:19 c
+.rw-r--r--@ 0 marcosmoura 17 Jul 14:19 d
+lrwxr-xr-x@ - marcosmoura 17 Jul 14:19 dir-symlink -> vagrant/debug
+.rw-r--r--@ 0 marcosmoura 17 Jul 14:19 e
+drwxr-xr-x@ - marcosmoura 17 Jul 14:19 exa
+.rw-r--r--@ 0 marcosmoura 17 Jul 14:19 f
+.rw-r--r--@ 0 marcosmoura 17 Jul 14:19 g
+.rw-r--r--@ 0 marcosmoura 17 Jul 14:19 h
+.rw-r--r--@ 0 marcosmoura 17 Jul 14:19 i
+.rw-r--r--@ 0 marcosmoura 17 Jul 14:19 image.jpg.img.c.rs.log.png
+.rw-r--r--@ 19 marcosmoura 17 Jul 14:19 index.svg
+.rw-r--r--@ 0 marcosmoura 17 Jul 14:19 j
+.rw-r--r--@ 0 marcosmoura 17 Jul 14:19 k
+.rw-r--r--@ 0 marcosmoura 17 Jul 14:19 l
+.rw-r--r--@ 0 marcosmoura 17 Jul 14:19 m
+.rw-r--r--@ 0 marcosmoura 17 Jul 14:19 n
+.rw-r--r--@ 0 marcosmoura 17 Jul 14:19 o
+.rw-r--r--@ 0 marcosmoura 17 Jul 14:19 p
+.rw-r--r--@ 0 marcosmoura 17 Jul 14:19 q
+drwxr-xr-x@ - marcosmoura 17 Jul 14:19 vagrant
diff --git a/tests/cmd/spacing_three_long_all.toml b/tests/cmd/spacing_three_long_all.toml
new file mode 100644
index 000000000..9c1b52b27
--- /dev/null
+++ b/tests/cmd/spacing_three_long_all.toml
@@ -0,0 +1,2 @@
+bin.name = "eza"
+args = "tests/itest -la --spacing 3"
diff --git a/tests/cmd/spacing_three_tree.stdout b/tests/cmd/spacing_three_tree.stdout
new file mode 100644
index 000000000..efea725d3
--- /dev/null
+++ b/tests/cmd/spacing_three_tree.stdout
@@ -0,0 +1,37 @@
+tests/itest
+├── a
+├── b
+├── c
+├── d
+├── dir-symlink -> vagrant/debug
+├── e
+├── exa
+│ ├── file.c -> djihisudjuhfius
+│ └── sssssssssssssssssssssssssggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggsssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss
+│ └── Makefile
+├── f
+├── g
+├── h
+├── i
+├── image.jpg.img.c.rs.log.png
+├── index.svg
+├── j
+├── k
+├── l
+├── m
+├── n
+├── o
+├── p
+├── q
+└── vagrant
+ ├── debug
+ │ ├── a
+ │ ├── symlink -> a
+ │ └── symlink-broken -> ./b
+ ├── dev
+ │ └── main.bf
+ └── log
+ ├── file.png
+ └── run
+ ├── run.log.text
+ └── sps.log.text
diff --git a/tests/cmd/spacing_three_tree.toml b/tests/cmd/spacing_three_tree.toml
new file mode 100644
index 000000000..a74c13e20
--- /dev/null
+++ b/tests/cmd/spacing_three_tree.toml
@@ -0,0 +1,2 @@
+bin.name = "eza"
+args = "tests/itest --tree --spacing 3"