Repository: eza-community/eza (language: rust)

Issue:
feat:  display  file/folder names with full path
It would be nice to have a flag to toggle the display of full paths with file and folder names.

Something similar to `find $PWD | xargs ls -ld`

You don't need this often, but sometimes such behaviour is desired if you plan to copy/paste file names to another terminal window, for example.


Discussion / hints:
This is a great idea
I'd like to work on this and will provide a proposal for the feature.

Fix patch:
diff --git a/Cargo.lock b/Cargo.lock
index 29a70c163..d3e15765e 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -391,6 +391,7 @@ dependencies = [
  "number_prefix",
  "once_cell",
  "palette",
+ "path-clean",
  "percent-encoding",
  "phf",
  "plist",
@@ -767,6 +768,12 @@ dependencies = [
  "thiserror",
 ]
 
+[[package]]
+name = "path-clean"
+version = "1.0.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "17359afc20d7ab31fdb42bb844c8b3bb1dabd7dcf7e68428492da7f16966fcef"
+
 [[package]]
 name = "percent-encoding"
 version = "2.3.1"
diff --git a/Cargo.toml b/Cargo.toml
index 5e90b4377..09be98511 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -78,6 +78,7 @@ libc = "0.2"
 locale = "0.2"
 log = "0.4"
 natord = "1.0"
+path-clean = "1.0.1"
 number_prefix = "0.4"
 palette = { version = "0.7.5", default-features = false, features = ["std"] }
 once_cell = "1.19.0"
diff --git a/README.md b/README.md
index d2363cabe..fefba8846 100644
--- a/README.md
+++ b/README.md
@@ -94,6 +94,7 @@ eza’s options are almost, but not quite, entirely unlike `ls`’s.
 - **--color-scale-mode=(mode)**: use gradient or fixed colors in --color-scale. valid options are `fixed` or `gradient`
 - **--icons=(when)**: when to display icons (always, auto, never)
 - **--hyperlink**: display entries as hyperlinks
+- **--absolute=(mode)**: display entries with their absolute path (on, follow, off)
 - **-w**, **--width=(columns)**: set screen width in columns
 
 ### Filtering options
diff --git a/completions/bash/eza b/completions/bash/eza
index e7d5c4c74..dbecd8a91 100644
--- a/completions/bash/eza
+++ b/completions/bash/eza
@@ -47,6 +47,11 @@ _eza() {
             mapfile -t COMPREPLY < <(compgen -W 'fixed gradient --' -- "$cur")
             return
             ;;
+
+        --absolute)
+            mapfile -t COMPREPLY < <(compgen -W 'on follow off --' -- "$cur")
+            return
+            ;;
     esac
 
     case "$cur" in
diff --git a/completions/fish/eza.fish b/completions/fish/eza.fish
index 75d247d6f..97a579c6f 100644
--- a/completions/fish/eza.fish
+++ b/completions/fish/eza.fish
@@ -38,6 +38,11 @@ complete -c eza -l icons -d "When to display icons" -x -a "
 "
 complete -c eza -l no-quotes -d "Don't quote file names with spaces"
 complete -c eza -l hyperlink -d "Display entries as hyperlinks"
+complete -c eza -l absolute -d "Display entries with their absolute path" -x -a "
+  on\t'Show absolute path for listed entries'
+  follow\t'Show absolute path with followed symlinks'
+  off\t'Do not show the absolute path'
+"
 complete -c eza -l smart-group -d "Only show group if it has a different name from owner"
 
 # Filtering and sorting options
diff --git a/completions/nush/eza.nu b/completions/nush/eza.nu
index 75fee4052..1859c0a1e 100644
--- a/completions/nush/eza.nu
+++ b/completions/nush/eza.nu
@@ -18,6 +18,7 @@ export extern "eza" [
     --icons                    # When to display icons
     --no-quotes                # Don't quote file names with spaces
     --hyperlink                # Display entries as hyperlinks
+    --absolute                 # Display entries with their absolute path
     --group-directories-first  # Sort directories before other files
     --git-ignore               # Ignore files mentioned in '.gitignore'
     --all(-a)                  # Show hidden and 'dot' files. Use this twice to also show the '.' and '..' directories
diff --git a/completions/zsh/_eza b/completions/zsh/_eza
index e6dee474d..ed1f0c299 100644
--- a/completions/zsh/_eza
+++ b/completions/zsh/_eza
@@ -26,6 +26,7 @@ __eza() {
         --icons="[When to display icons]:(when):(always auto automatic never)" \
         --no-quotes"[Don't quote filenames with spaces]" \
         --hyperlink"[Display entries as hyperlinks]" \
+        --absolute"[Display entries with their absolute path]:(mode):(on follow off)" \
         --group-directories-first"[Sort directories before other files]" \
         --git-ignore"[Ignore files mentioned in '.gitignore']" \
         {-a,--all}"[Show hidden and 'dot' files. Use this twice to also show the '.' and '..' directories]" \
diff --git a/src/fs/file.rs b/src/fs/file.rs
index f410f5fc9..efac1f93f 100644
--- a/src/fs/file.rs
+++ b/src/fs/file.rs
@@ -343,7 +343,19 @@ impl<'dir> File<'dir> {
     /// Determine the full path resolving all symbolic links on demand.
     pub fn absolute_path(&self) -> Option<&PathBuf> {
         self.absolute_path
-            .get_or_init(|| std::fs::canonicalize(&self.path).ok())
+            .get_or_init(|| {
+                if self.link_target().is_broken() {
+                    // workaround for broken symlinks to get absolute path for parent and then
+                    // append name of file; std::fs::canonicalize requires all path components
+                    // (including the last one) to exist
+                    self.path
+                        .parent()
+                        .and_then(|parent| std::fs::canonicalize(parent).ok())
+                        .map(|p| p.join(self.name.clone()))
+                } else {
+                    std::fs::canonicalize(&self.path).ok()
+                }
+            })
             .as_ref()
     }
 
diff --git a/src/options/file_name.rs b/src/options/file_name.rs
index 0a7bfc097..e3cdd69e8 100644
--- a/src/options/file_name.rs
+++ b/src/options/file_name.rs
@@ -2,7 +2,9 @@ use crate::options::parser::MatchedFlags;
 use crate::options::vars::{self, Vars};
 use crate::options::{flags, NumberSource, OptionsError};
 
-use crate::output::file_name::{Classify, EmbedHyperlinks, Options, QuoteStyle, ShowIcons};
+use crate::output::file_name::{
+    Absolute, Classify, EmbedHyperlinks, Options, QuoteStyle, ShowIcons,
+};
 
 impl Options {
     pub fn deduce<V: Vars>(
@@ -16,11 +18,14 @@ impl Options {
         let quote_style = QuoteStyle::deduce(matches)?;
         let embed_hyperlinks = EmbedHyperlinks::deduce(matches)?;
 
+        let absolute = Absolute::deduce(matches)?;
+
         Ok(Self {
             classify,
             show_icons,
             quote_style,
             embed_hyperlinks,
+            absolute,
             is_a_tty,
         })
     }
@@ -113,3 +118,17 @@ impl EmbedHyperlinks {
         }
     }
 }
+
+impl Absolute {
+    fn deduce(matches: &MatchedFlags<'_>) -> Result<Self, OptionsError> {
+        match matches.get(&flags::ABSOLUTE)? {
+            Some(word) => match word.to_str() {
+                Some("on" | "yes") => Ok(Self::On),
+                Some("follow") => Ok(Self::Follow),
+                Some("off" | "no") | None => Ok(Self::Off),
+                _ => Err(OptionsError::BadArgument(&flags::ABSOLUTE, word.into())),
+            },
+            None => Ok(Self::Off),
+        }
+    }
+}
diff --git a/src/options/flags.rs b/src/options/flags.rs
index 16153c656..3d6d8359b 100644
--- a/src/options/flags.rs
+++ b/src/options/flags.rs
@@ -15,6 +15,8 @@ pub static CLASSIFY:    Arg = Arg { short: Some(b'F'), long: "classify",    take
 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 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") };
+const ABSOLUTE_MODES: &[&str] = &["on", "follow", "off"];
 
 pub static COLOR:  Arg = Arg { short: None, long: "color",  takes_value: TakesValue::Optional(Some(WHEN), "auto") };
 pub static COLOUR: Arg = Arg { short: None, long: "colour", takes_value: TakesValue::Optional(Some(WHEN), "auto") };
@@ -88,7 +90,7 @@ pub static ALL_ARGS: Args = Args(&[
 
     &ONE_LINE, &LONG, &GRID, &ACROSS, &RECURSE, &TREE, &CLASSIFY, &DEREF_LINKS,
     &COLOR, &COLOUR, &COLOR_SCALE, &COLOUR_SCALE, &COLOR_SCALE_MODE, &COLOUR_SCALE_MODE,
-    &WIDTH, &NO_QUOTES,
+    &WIDTH, &NO_QUOTES, &ABSOLUTE,
 
     &ALL, &ALMOST_ALL, &LIST_DIRS, &LEVEL, &REVERSE, &SORT, &DIRS_FIRST,
     &IGNORE_GLOB, &GIT_IGNORE, &ONLY_DIRS, &ONLY_FILES,
diff --git a/src/options/help.rs b/src/options/help.rs
index e4f456a70..0e456d070 100644
--- a/src/options/help.rs
+++ b/src/options/help.rs
@@ -26,6 +26,7 @@ DISPLAY OPTIONS
   --icons=WHEN               when to display icons (always, auto, never)
   --no-quotes                don't quote file names with spaces
   --hyperlink                display entries as hyperlinks
+  --absolute                 display entries with their absolute path (on, follow, off)
   -w, --width COLS           set screen width in columns
 
 
diff --git a/src/output/file_name.rs b/src/output/file_name.rs
index b9275af2b..be92b3491 100644
--- a/src/output/file_name.rs
+++ b/src/output/file_name.rs
@@ -2,6 +2,7 @@ use std::fmt::Debug;
 use std::path::Path;
 
 use ansiterm::{ANSIString, Style};
+use path_clean;
 use unicode_width::UnicodeWidthStr;
 
 use crate::fs::{File, FileTarget};
@@ -25,6 +26,9 @@ pub struct Options {
     /// Whether to make file names hyperlinks.
     pub embed_hyperlinks: EmbedHyperlinks,
 
+    /// Whether to display files with their absolute path.
+    pub absolute: Absolute,
+
     /// Whether we are in a console or redirecting the output
     pub is_a_tty: bool,
 }
@@ -114,6 +118,14 @@ pub enum EmbedHyperlinks {
     On,
 }
 
+/// Whether to show absolute paths
+#[derive(PartialEq, Eq, Debug, Copy, Clone)]
+pub enum Absolute {
+    On,
+    Follow,
+    Off,
+}
+
 /// Whether or not to wrap file names with spaces in quotes.
 #[derive(PartialEq, Debug, Copy, Clone)]
 pub enum QuoteStyle {
@@ -231,6 +243,7 @@ impl<'a, 'dir, C: Colours> FileName<'a, 'dir, C> {
                             show_icons: ShowIcons::Never,
                             embed_hyperlinks: EmbedHyperlinks::Off,
                             is_a_tty: self.options.is_a_tty,
+                            absolute: Absolute::Off,
                         };
 
                         let target_name = FileName {
@@ -392,7 +405,7 @@ impl<'a, 'dir, C: Colours> FileName<'a, 'dir, C> {
         }
 
         escape(
-            self.file.name.clone(),
+            self.display_name(),
             &mut bits,
             file_style,
             self.colours.control_char(),
@@ -408,6 +421,24 @@ impl<'a, 'dir, C: Colours> FileName<'a, 'dir, C> {
         bits
     }
 
+    /// Returns the string that should be displayed as the file's name.
+    fn display_name(&self) -> String {
+        match self.options.absolute {
+            Absolute::On => std::env::current_dir().ok().and_then(|p| {
+                path_clean::clean(p.join(&self.file.path))
+                    .to_str()
+                    .map(std::borrow::ToOwned::to_owned)
+            }),
+            Absolute::Follow => self
+                .file
+                .absolute_path()
+                .and_then(|p| p.to_str())
+                .map(std::borrow::ToOwned::to_owned),
+            Absolute::Off => None,
+        }
+        .unwrap_or(self.file.name.clone())
+    }
+
     /// Figures out which colour to paint the filename part of the output,
     /// depending on which “type” of file it appears to be — either from the
     /// class on the filesystem or from its name. (Or the broken link colour,


Test patch:
diff --git a/powertest.yaml b/powertest.yaml
index a3968b245..8889db07d 100644
--- a/powertest.yaml
+++ b/powertest.yaml
@@ -67,6 +67,12 @@ commands:
     - --no-quotes
   ? - null
     - --hyperlink
+  ? - null
+    - --absolute
+  : values:
+      - on
+      - follow
+      - off
   ? - -w
     - --width
   : values:
diff --git a/tests/cmd/absolute_recurse_unix.stderr b/tests/cmd/absolute_recurse_unix.stderr
new file mode 100644
index 000000000..e69de29bb
diff --git a/tests/cmd/absolute_recurse_unix.stdout b/tests/cmd/absolute_recurse_unix.stdout
new file mode 100644
index 000000000..44233b948
--- /dev/null
+++ b/tests/cmd/absolute_recurse_unix.stdout
@@ -0,0 +1,50 @@
+[CWD]/tests/itest/a
+[CWD]/tests/itest/b
+[CWD]/tests/itest/c
+[CWD]/tests/itest/d
+[CWD]/tests/itest/dir-symlink -> vagrant/debug
+[CWD]/tests/itest/e
+[CWD]/tests/itest/exa
+[CWD]/tests/itest/f
+[CWD]/tests/itest/g
+[CWD]/tests/itest/h
+[CWD]/tests/itest/i
+[CWD]/tests/itest/image.jpg.img.c.rs.log.png
+[CWD]/tests/itest/index.svg
+[CWD]/tests/itest/j
+[CWD]/tests/itest/k
+[CWD]/tests/itest/l
+[CWD]/tests/itest/m
+[CWD]/tests/itest/n
+[CWD]/tests/itest/o
+[CWD]/tests/itest/p
+[CWD]/tests/itest/q
+[CWD]/tests/itest/vagrant
+
+tests/itest/exa:
+[CWD]/tests/itest/exa/file.c -> djihisudjuhfius
+[CWD]/tests/itest/exa/sssssssssssssssssssssssssggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggsssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss
+
+tests/itest/exa/sssssssssssssssssssssssssggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggsssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss:
+[CWD]/tests/itest/exa/sssssssssssssssssssssssssggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggsssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss/Makefile
+
+tests/itest/vagrant:
+[CWD]/tests/itest/vagrant/debug
+[CWD]/tests/itest/vagrant/dev
+[CWD]/tests/itest/vagrant/log
+
+tests/itest/vagrant/debug:
+[CWD]/tests/itest/vagrant/debug/a
+[CWD]/tests/itest/vagrant/debug/symlink -> a
+[CWD]/tests/itest/vagrant/debug/symlink-broken -> ./b
+
+tests/itest/vagrant/dev:
+[CWD]/tests/itest/vagrant/dev/main.bf
+
+tests/itest/vagrant/log:
+[CWD]/tests/itest/vagrant/log/file.png
+[CWD]/tests/itest/vagrant/log/run
+
+tests/itest/vagrant/log/run:
+[CWD]/tests/itest/vagrant/log/run/run.log.text
+[CWD]/tests/itest/vagrant/log/run/sps.log.text
diff --git a/tests/cmd/absolute_recurse_unix.toml b/tests/cmd/absolute_recurse_unix.toml
new file mode 100644
index 000000000..9b941618f
--- /dev/null
+++ b/tests/cmd/absolute_recurse_unix.toml
@@ -0,0 +1,2 @@
+bin.name = "eza"
+args = "tests/itest --absolute -R"
diff --git a/tests/cmd/absolute_unix.stderr b/tests/cmd/absolute_unix.stderr
new file mode 100644
index 000000000..e69de29bb
diff --git a/tests/cmd/absolute_unix.stdout b/tests/cmd/absolute_unix.stdout
new file mode 100644
index 000000000..64ff7ae26
--- /dev/null
+++ b/tests/cmd/absolute_unix.stdout
@@ -0,0 +1,22 @@
+[CWD]/tests/itest/a
+[CWD]/tests/itest/b
+[CWD]/tests/itest/c
+[CWD]/tests/itest/d
+[CWD]/tests/itest/dir-symlink -> vagrant/debug
+[CWD]/tests/itest/e
+[CWD]/tests/itest/exa
+[CWD]/tests/itest/f
+[CWD]/tests/itest/g
+[CWD]/tests/itest/h
+[CWD]/tests/itest/i
+[CWD]/tests/itest/image.jpg.img.c.rs.log.png
+[CWD]/tests/itest/index.svg
+[CWD]/tests/itest/j
+[CWD]/tests/itest/k
+[CWD]/tests/itest/l
+[CWD]/tests/itest/m
+[CWD]/tests/itest/n
+[CWD]/tests/itest/o
+[CWD]/tests/itest/p
+[CWD]/tests/itest/q
+[CWD]/tests/itest/vagrant
diff --git a/tests/cmd/absolute_unix.toml b/tests/cmd/absolute_unix.toml
new file mode 100644
index 000000000..d1442b947
--- /dev/null
+++ b/tests/cmd/absolute_unix.toml
@@ -0,0 +1,2 @@
+bin.name = "eza"
+args = "tests/itest --absolute"
diff --git a/tests/cmd/basic_all.stdout b/tests/cmd/basic_all.stdout
index a61f5881f..419606b51 100644
--- a/tests/cmd/basic_all.stdout
+++ b/tests/cmd/basic_all.stdout
@@ -2,6 +2,7 @@ a
 b
 c
 d
+dir-symlink -> vagrant/debug
 e
 exa
 f
diff --git a/tests/cmd/icons_all.stdout b/tests/cmd/icons_all.stdout
index 4a3799e3f..b9c321cad 100644
--- a/tests/cmd/icons_all.stdout
+++ b/tests/cmd/icons_all.stdout
@@ -2,6 +2,7 @@
  b
  c
  d
+ dir-symlink -> vagrant/debug
  e
  exa
  f
diff --git a/tests/cmd/long_windows.stdout b/tests/cmd/long_windows.stdout
index bb3b0c904..23c448004 100644
--- a/tests/cmd/long_windows.stdout
+++ b/tests/cmd/long_windows.stdout
@@ -2,6 +2,7 @@
 -a--- b
 -a--- c
 -a--- d
+l---- dir-symlink -> vagrant/debug
 -a--- e
 d---- exa
 -a--- f
diff --git a/tests/gen/absolute_recurse_unix.stderr b/tests/gen/absolute_recurse_unix.stderr
new file mode 100644
index 000000000..e69de29bb
diff --git a/tests/gen/absolute_recurse_unix.stdout b/tests/gen/absolute_recurse_unix.stdout
new file mode 100644
index 000000000..256ece1fc
--- /dev/null
+++ b/tests/gen/absolute_recurse_unix.stdout
@@ -0,0 +1,50 @@
+/build/source/tests/itest/a
+/build/source/tests/itest/b
+/build/source/tests/itest/c
+/build/source/tests/itest/d
+/build/source/tests/itest/dir-symlink -> vagrant/debug
+/build/source/tests/itest/e
+/build/source/tests/itest/exa
+/build/source/tests/itest/f
+/build/source/tests/itest/g
+/build/source/tests/itest/h
+/build/source/tests/itest/i
+/build/source/tests/itest/image.jpg.img.c.rs.log.png
+/build/source/tests/itest/index.svg
+/build/source/tests/itest/j
+/build/source/tests/itest/k
+/build/source/tests/itest/l
+/build/source/tests/itest/m
+/build/source/tests/itest/n
+/build/source/tests/itest/o
+/build/source/tests/itest/p
+/build/source/tests/itest/q
+/build/source/tests/itest/vagrant
+
+tests/itest/exa:
+/build/source/tests/itest/exa/file.c -> djihisudjuhfius
+/build/source/tests/itest/exa/sssssssssssssssssssssssssggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggsssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss
+
+tests/itest/exa/sssssssssssssssssssssssssggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggsssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss:
+/build/source/tests/itest/exa/sssssssssssssssssssssssssggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggsssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss/Makefile
+
+tests/itest/vagrant:
+/build/source/tests/itest/vagrant/debug
+/build/source/tests/itest/vagrant/dev
+/build/source/tests/itest/vagrant/log
+
+tests/itest/vagrant/debug:
+/build/source/tests/itest/vagrant/debug/a
+/build/source/tests/itest/vagrant/debug/symlink -> a
+/build/source/tests/itest/vagrant/debug/symlink-broken -> ./b
+
+tests/itest/vagrant/dev:
+/build/source/tests/itest/vagrant/dev/main.bf
+
+tests/itest/vagrant/log:
+/build/source/tests/itest/vagrant/log/file.png
+/build/source/tests/itest/vagrant/log/run
+
+tests/itest/vagrant/log/run:
+/build/source/tests/itest/vagrant/log/run/run.log.text
+/build/source/tests/itest/vagrant/log/run/sps.log.text
diff --git a/tests/gen/absolute_unix.stderr b/tests/gen/absolute_unix.stderr
new file mode 100644
index 000000000..e69de29bb
diff --git a/tests/gen/absolute_unix.stdout b/tests/gen/absolute_unix.stdout
new file mode 100644
index 000000000..d32c0bea8
--- /dev/null
+++ b/tests/gen/absolute_unix.stdout
@@ -0,0 +1,22 @@
+/build/source/tests/itest/a
+/build/source/tests/itest/b
+/build/source/tests/itest/c
+/build/source/tests/itest/d
+/build/source/tests/itest/dir-symlink -> vagrant/debug
+/build/source/tests/itest/e
+/build/source/tests/itest/exa
+/build/source/tests/itest/f
+/build/source/tests/itest/g
+/build/source/tests/itest/h
+/build/source/tests/itest/i
+/build/source/tests/itest/image.jpg.img.c.rs.log.png
+/build/source/tests/itest/index.svg
+/build/source/tests/itest/j
+/build/source/tests/itest/k
+/build/source/tests/itest/l
+/build/source/tests/itest/m
+/build/source/tests/itest/n
+/build/source/tests/itest/o
+/build/source/tests/itest/p
+/build/source/tests/itest/q
+/build/source/tests/itest/vagrant
diff --git a/tests/gen/ptest_19a666ddec321ae2.stderr b/tests/gen/ptest_19a666ddec321ae2.stderr
new file mode 100644
index 000000000..e69de29bb
diff --git a/tests/gen/ptest_19a666ddec321ae2.stdout b/tests/gen/ptest_19a666ddec321ae2.stdout
new file mode 100644
index 000000000..811a8f117
--- /dev/null
+++ b/tests/gen/ptest_19a666ddec321ae2.stdout
@@ -0,0 +1,9 @@
+git
+grid
+group
+icons
+perms
+size
+specials
+symlinks
+time
diff --git a/tests/gen/ptest_2dbc2104ddb934cd.stderr b/tests/gen/ptest_2dbc2104ddb934cd.stderr
new file mode 100644
index 000000000..e69de29bb
diff --git a/tests/gen/ptest_2dbc2104ddb934cd.stdout b/tests/gen/ptest_2dbc2104ddb934cd.stdout
new file mode 100644
index 000000000..811a8f117
--- /dev/null
+++ b/tests/gen/ptest_2dbc2104ddb934cd.stdout
@@ -0,0 +1,9 @@
+git
+grid
+group
+icons
+perms
+size
+specials
+symlinks
+time
diff --git a/tests/gen/ptest_4b30f7de50929327.stderr b/tests/gen/ptest_4b30f7de50929327.stderr
new file mode 100644
index 000000000..e69de29bb
diff --git a/tests/gen/ptest_4b30f7de50929327.stdout b/tests/gen/ptest_4b30f7de50929327.stdout
new file mode 100644
index 000000000..c856e5961
--- /dev/null
+++ b/tests/gen/ptest_4b30f7de50929327.stdout
@@ -0,0 +1,9 @@
+/build/source/tests/test_dir/git
+/build/source/tests/test_dir/grid
+/build/source/tests/test_dir/group
+/build/source/tests/test_dir/icons
+/build/source/tests/test_dir/perms
+/build/source/tests/test_dir/size
+/build/source/tests/test_dir/specials
+/build/source/tests/test_dir/symlinks
+/build/source/tests/test_dir/time
diff --git a/tests/gen/ptest_4b7165c936488151.stderr b/tests/gen/ptest_4b7165c936488151.stderr
new file mode 100644
index 000000000..e69de29bb
diff --git a/tests/gen/ptest_4b7165c936488151.stdout b/tests/gen/ptest_4b7165c936488151.stdout
new file mode 100644
index 000000000..811a8f117
--- /dev/null
+++ b/tests/gen/ptest_4b7165c936488151.stdout
@@ -0,0 +1,9 @@
+git
+grid
+group
+icons
+perms
+size
+specials
+symlinks
+time
diff --git a/tests/gen/ptest_82a40fefd797654.stderr b/tests/gen/ptest_82a40fefd797654.stderr
new file mode 100644
index 000000000..e69de29bb
diff --git a/tests/gen/ptest_82a40fefd797654.stdout b/tests/gen/ptest_82a40fefd797654.stdout
new file mode 100644
index 000000000..c856e5961
--- /dev/null
+++ b/tests/gen/ptest_82a40fefd797654.stdout
@@ -0,0 +1,9 @@
+/build/source/tests/test_dir/git
+/build/source/tests/test_dir/grid
+/build/source/tests/test_dir/group
+/build/source/tests/test_dir/icons
+/build/source/tests/test_dir/perms
+/build/source/tests/test_dir/size
+/build/source/tests/test_dir/specials
+/build/source/tests/test_dir/symlinks
+/build/source/tests/test_dir/time
diff --git a/tests/gen/ptest_a920233617a69b55.stderr b/tests/gen/ptest_a920233617a69b55.stderr
new file mode 100644
index 000000000..e69de29bb
diff --git a/tests/gen/ptest_a920233617a69b55.stdout b/tests/gen/ptest_a920233617a69b55.stdout
new file mode 100644
index 000000000..c856e5961
--- /dev/null
+++ b/tests/gen/ptest_a920233617a69b55.stdout
@@ -0,0 +1,9 @@
+/build/source/tests/test_dir/git
+/build/source/tests/test_dir/grid
+/build/source/tests/test_dir/group
+/build/source/tests/test_dir/icons
+/build/source/tests/test_dir/perms
+/build/source/tests/test_dir/size
+/build/source/tests/test_dir/specials
+/build/source/tests/test_dir/symlinks
+/build/source/tests/test_dir/time
diff --git a/tests/gen/ptest_f90d48e69d70b41.stderr b/tests/gen/ptest_f90d48e69d70b41.stderr
new file mode 100644
index 000000000..e69de29bb
diff --git a/tests/gen/ptest_f90d48e69d70b41.stdout b/tests/gen/ptest_f90d48e69d70b41.stdout
new file mode 100644
index 000000000..c856e5961
--- /dev/null
+++ b/tests/gen/ptest_f90d48e69d70b41.stdout
@@ -0,0 +1,9 @@
+/build/source/tests/test_dir/git
+/build/source/tests/test_dir/grid
+/build/source/tests/test_dir/group
+/build/source/tests/test_dir/icons
+/build/source/tests/test_dir/perms
+/build/source/tests/test_dir/size
+/build/source/tests/test_dir/specials
+/build/source/tests/test_dir/symlinks
+/build/source/tests/test_dir/time
diff --git a/tests/itest/dir-symlink b/tests/itest/dir-symlink
new file mode 120000
index 000000000..7d4306298
--- /dev/null
+++ b/tests/itest/dir-symlink
@@ -0,0 +1,1 @@
+vagrant/debug
\ No newline at end of file
diff --git a/tests/ptests/ptest_2439b7d68089135b.stdout b/tests/ptests/ptest_2439b7d68089135b.stdout
index d9d9a520e..67c8b96f6 100644
--- a/tests/ptests/ptest_2439b7d68089135b.stdout
+++ b/tests/ptests/ptest_2439b7d68089135b.stdout
@@ -20,6 +20,7 @@ DISPLAY OPTIONS
   --icons=WHEN               when to display icons (always, auto, never)
   --no-quotes                don't quote file names with spaces
   --hyperlink                display entries as hyperlinks
+  --absolute                 display entries with their absolute path (on, follow, off)
   -w, --width COLS           set screen width in columns
 
 
diff --git a/tests/ptests/ptest_4b30f7de50929327.stderr b/tests/ptests/ptest_4b30f7de50929327.stderr
new file mode 100644
index 000000000..e69de29bb
diff --git a/tests/ptests/ptest_4b30f7de50929327.stdout b/tests/ptests/ptest_4b30f7de50929327.stdout
new file mode 100644
index 000000000..c856e5961
--- /dev/null
+++ b/tests/ptests/ptest_4b30f7de50929327.stdout
@@ -0,0 +1,9 @@
+/build/source/tests/test_dir/git
+/build/source/tests/test_dir/grid
+/build/source/tests/test_dir/group
+/build/source/tests/test_dir/icons
+/build/source/tests/test_dir/perms
+/build/source/tests/test_dir/size
+/build/source/tests/test_dir/specials
+/build/source/tests/test_dir/symlinks
+/build/source/tests/test_dir/time
diff --git a/tests/ptests/ptest_4b30f7de50929327.toml b/tests/ptests/ptest_4b30f7de50929327.toml
new file mode 100644
index 000000000..f7c6623a9
--- /dev/null
+++ b/tests/ptests/ptest_4b30f7de50929327.toml
@@ -0,0 +1,2 @@
+bin.name = "eza"
+args = "tests/test_dir --absolute follow"
diff --git a/tests/ptests/ptest_4b7165c936488151.stderr b/tests/ptests/ptest_4b7165c936488151.stderr
new file mode 100644
index 000000000..e69de29bb
diff --git a/tests/ptests/ptest_4b7165c936488151.stdout b/tests/ptests/ptest_4b7165c936488151.stdout
new file mode 100644
index 000000000..811a8f117
--- /dev/null
+++ b/tests/ptests/ptest_4b7165c936488151.stdout
@@ -0,0 +1,9 @@
+git
+grid
+group
+icons
+perms
+size
+specials
+symlinks
+time
diff --git a/tests/ptests/ptest_4b7165c936488151.toml b/tests/ptests/ptest_4b7165c936488151.toml
new file mode 100644
index 000000000..0280ffe7b
--- /dev/null
+++ b/tests/ptests/ptest_4b7165c936488151.toml
@@ -0,0 +1,2 @@
+bin.name = "eza"
+args = "tests/test_dir --absolute off"
diff --git a/tests/ptests/ptest_f90d48e69d70b41.stderr b/tests/ptests/ptest_f90d48e69d70b41.stderr
new file mode 100644
index 000000000..e69de29bb
diff --git a/tests/ptests/ptest_f90d48e69d70b41.stdout b/tests/ptests/ptest_f90d48e69d70b41.stdout
new file mode 100644
index 000000000..c856e5961
--- /dev/null
+++ b/tests/ptests/ptest_f90d48e69d70b41.stdout
@@ -0,0 +1,9 @@
+/build/source/tests/test_dir/git
+/build/source/tests/test_dir/grid
+/build/source/tests/test_dir/group
+/build/source/tests/test_dir/icons
+/build/source/tests/test_dir/perms
+/build/source/tests/test_dir/size
+/build/source/tests/test_dir/specials
+/build/source/tests/test_dir/symlinks
+/build/source/tests/test_dir/time
diff --git a/tests/ptests/ptest_f90d48e69d70b41.toml b/tests/ptests/ptest_f90d48e69d70b41.toml
new file mode 100644
index 000000000..001c03e5b
--- /dev/null
+++ b/tests/ptests/ptest_f90d48e69d70b41.toml
@@ -0,0 +1,2 @@
+bin.name = "eza"
+args = "tests/test_dir --absolute on"