Introduce EXA_ICON_SPACING environment variable

This commit remove the extra space that was added between icons and file names in commit 128fadd, and adds an option to put them back.

Re-fixes GH-619 and fixes GH-541.
This commit is contained in:
Benjamin Sago 2020-10-24 19:39:22 +01:00
parent c83359225b
commit 51be9f4c43
18 changed files with 389 additions and 271 deletions

View File

@ -208,6 +208,12 @@ Limits the grid-details view (`exa --grid --long`) so its only activate
With widescreen displays, its possible for the grid to look very wide and sparse, on just one or two lines with none of the columns lining up.
By specifying a minimum number of rows, you can only use the view if its going to be worth using.
## `EXA_ICON_SPACING`
Specifies the number of spaces to print between an icon (see the `--icons` option) and its file name.
Different terminals display icons differently, as they usually take up more than one character width on screen, so theres no “standard” number of spaces that exa can use to separate an icon from text. One space may place the icon too close to the text, and two spaces may place it too far away. So the choice is left up to the user to configure depending on their terminal emulator.
## `LS_COLORS`, `EXA_COLORS`
Specifies the colour scheme used to highlight files based on their name and kind, as well as highlighting metadata and parts of the UI.

View File

@ -1,15 +1,16 @@
use crate::options::{flags, OptionsError};
use crate::options::parser::MatchedFlags;
use crate::options::vars::{self, Vars};
use crate::output::file_name::{Options, Classify};
use crate::output::file_name::{Options, Classify, ShowIcons};
impl Options {
pub fn deduce(matches: &MatchedFlags<'_>) -> Result<Self, OptionsError> {
pub fn deduce<V: Vars>(matches: &MatchedFlags<'_>, vars: &V) -> Result<Self, OptionsError> {
let classify = Classify::deduce(matches)?;
let icons = matches.has(&flags::ICONS)?;
let show_icons = ShowIcons::deduce(matches, vars)?;
Ok(Self { classify, icons })
Ok(Self { classify, show_icons })
}
}
@ -21,3 +22,20 @@ impl Classify {
else { Ok(Self::JustFilenames) }
}
}
impl ShowIcons {
pub fn deduce<V: Vars>(matches: &MatchedFlags<'_>, vars: &V) -> Result<Self, OptionsError> {
if ! matches.has(&flags::ICONS)? {
Ok(Self::Off)
}
else if let Some(columns) = vars.get(vars::EXA_ICON_SPACING).and_then(|s| s.into_string().ok()) {
match columns.parse() {
Ok(width) => Ok(Self::On(width)),
Err(e) => Err(OptionsError::FailedParse(e)),
}
}
else {
Ok(Self::On(1))
}
}
}

View File

@ -39,6 +39,12 @@ pub static EXA_DEBUG: &str = "EXA_DEBUG";
/// number of rows of output.
pub static EXA_GRID_ROWS: &str = "EXA_GRID_ROWS";
/// Environment variable used to specify how many spaces to print between an
/// icon and its file name. Different terminals display icons differently,
/// with 1 space bringing them too close together or 2 spaces putting them too
/// far apart, so this may be necessary depending on how they are shown.
pub static EXA_ICON_SPACING: &str = "EXA_ICON_SPACING";
/// Mockable wrapper for `std::env::var_os`.
pub trait Vars {

View File

@ -12,7 +12,7 @@ impl View {
pub fn deduce<V: Vars>(matches: &MatchedFlags<'_>, vars: &V) -> Result<Self, OptionsError> {
let mode = Mode::deduce(matches, vars)?;
let width = TerminalWidth::deduce(vars)?;
let file_style = FileStyle::deduce(matches)?;
let file_style = FileStyle::deduce(matches, vars)?;
Ok(Self { mode, width, file_style })
}
}

View File

@ -18,7 +18,7 @@ pub struct Options {
pub classify: Classify,
/// Whether to prepend icon characters before file names.
pub icons: bool,
pub show_icons: ShowIcons,
}
impl Options {
@ -72,6 +72,19 @@ impl Default for Classify {
}
/// Whether and how to show icons.
#[derive(PartialEq, Debug, Copy, Clone)]
pub enum ShowIcons {
/// Dont show icons at all.
Off,
/// Show icons next to file names, with the given number of spaces between
/// the icon and the file name.
On(u32),
}
/// A **file name** holds all the information necessary to display the name
/// of the given file. This is used in all of the views.
pub struct FileName<'a, 'dir, C> {
@ -112,12 +125,17 @@ impl<'a, 'dir, C: Colours> FileName<'a, 'dir, C> {
pub fn paint(&self) -> TextCellContents {
let mut bits = Vec::new();
if self.options.icons {
if let ShowIcons::On(spaces_count) = self.options.show_icons {
let style = iconify_style(self.style());
let file_icon = icon_for_file(self.file).to_string();
bits.push(style.paint(file_icon));
bits.push(Style::default().paint(" "));
match spaces_count {
1 => bits.push(Style::default().paint(" ")),
2 => bits.push(Style::default().paint(" ")),
n => bits.push(Style::default().paint(spaces(n))),
}
}
if self.file.parent_dir.is_none() {
@ -152,7 +170,7 @@ impl<'a, 'dir, C: Colours> FileName<'a, 'dir, C> {
if ! target.name.is_empty() {
let target_options = Options {
classify: Classify::JustFilenames,
icons: false,
show_icons: ShowIcons::Off,
};
let target = FileName {
@ -320,3 +338,9 @@ pub trait Colours: FiletypeColours {
fn colour_file(&self, file: &File<'_>) -> Style;
}
/// Generate a string made of `n` spaces.
fn spaces(width: u32) -> String {
(0 .. width).into_iter().map(|_| ' ').collect()
}

View File

@ -77,3 +77,38 @@ stdout = { file = "outputs/links_oneline_icons.ansitxt" }
stderr = { empty = true }
status = 0
tags = [ 'oneline', 'icons' ]
# icon spacing tests
[[cmd]]
name = "EXA_ICON_SPACING=0 exa -1 --icons puts no spaces between icons and file names"
shell = "EXA_ICON_SPACING=0 exa -1 --icons /testcases/links"
stdout = { file = "outputs/links_oneline_icons_width0.ansitxt" }
stderr = { empty = true }
status = 0
tags = [ 'env', 'oneline', 'icons' ]
[[cmd]]
name = "EXA_ICON_SPACING=1 exa -1 --icons puts one space between icons and file names"
shell = "EXA_ICON_SPACING=1 exa -1 --icons /testcases/links"
stdout = { file = "outputs/links_oneline_icons.ansitxt" } # same as the default
stderr = { empty = true }
status = 0
tags = [ 'env', 'oneline', 'icons' ]
[[cmd]]
name = "EXA_ICON_SPACING=2 exa -1 --icons puts two spaces between icons and file names"
shell = "EXA_ICON_SPACING=2 exa -1 --icons /testcases/links"
stdout = { file = "outputs/links_oneline_icons_width2.ansitxt" }
stderr = { empty = true }
status = 0
tags = [ 'env', 'oneline', 'icons' ]
[[cmd]]
name = "EXA_ICON_SPACING=3 exa -1 --icons puts three spaces between icons and file names"
shell = "EXA_ICON_SPACING=3 exa -1 --icons /testcases/links"
stdout = { file = "outputs/links_oneline_icons_width3.ansitxt" }
stderr = { empty = true }
status = 0
tags = [ 'env', 'oneline', 'icons' ]

View File

@ -1,26 +1,26 @@
 #SAVEFILE#
 backup~
 compiled.class
compiled.coffee
 compiled.js
 compiled.o
 compressed.deb
 compressed.tar.gz
 compressed.tar.xz
 compressed.tgz
 compressed.txz
 COMPRESSED.ZIP
 crypto.asc
 crypto.signature
 document.pdf
 DOCUMENT.XLSX
 file.tmp
 IMAGE.PNG
 image.svg
 lossless.flac
 lossless.wav
 Makefile
 music.mp3
 MUSIC.OGG
 VIDEO.AVI
 video.wmv
 #SAVEFILE#
 backup~
 compiled.class
 compiled.coffee
 compiled.js
 compiled.o
 compressed.deb
 compressed.tar.gz
 compressed.tar.xz
 compressed.tgz
 compressed.txz
 COMPRESSED.ZIP
 crypto.asc
 crypto.signature
 document.pdf
 DOCUMENT.XLSX
 file.tmp
 IMAGE.PNG
 image.svg
 lossless.flac
 lossless.wav
 Makefile
 music.mp3
 MUSIC.OGG
 VIDEO.AVI
 video.wmv

View File

@ -1,7 +1,6 @@
 1_bytes  3_KiB  5_MiB  8_bytes  10_KiB  12_MiB
 1_KiB  3_MiB  6_bytes  8_KiB  10_MiB  13_bytes
 1_MiB  4_bytes  6_KiB  8_MiB  11_bytes  13_KiB
 2_bytes  4_KiB  6_MiB  9_bytes  11_KiB  13_MiB
 2_KiB  4_MiB  7_bytes  9_KiB  11_MiB
 2_MiB  5_bytes  7_KiB  9_MiB  12_bytes
 3_bytes  5_KiB  7_MiB  10_bytes  12_KiB
 1_bytes  3_bytes  5_bytes  7_bytes  9_bytes  11_bytes  13_bytes
 1_KiB  3_KiB  5_KiB  7_KiB  9_KiB  11_KiB  13_KiB
 1_MiB  3_MiB  5_MiB  7_MiB  9_MiB  11_MiB  13_MiB
 2_bytes  4_bytes  6_bytes  8_bytes  10_bytes  12_bytes
 2_KiB  4_KiB  6_KiB  8_KiB  10_KiB  12_KiB
 2_MiB  4_MiB  6_MiB  8_MiB  10_MiB  12_MiB

View File

@ -1,39 +1,39 @@
.rw-r--r-- 1 cassowary  1 Jan 12:34  1_bytes
.rw-r--r-- 1.0k cassowary  1 Jan 12:34  1_KiB
.rw-r--r-- 1.0M cassowary  1 Jan 12:34  1_MiB
.rw-r--r-- 2 cassowary  1 Jan 12:34  2_bytes
.rw-r--r-- 2.0k cassowary  1 Jan 12:34  2_KiB
.rw-r--r-- 2.1M cassowary  1 Jan 12:34  2_MiB
.rw-r--r-- 3 cassowary  1 Jan 12:34  3_bytes
.rw-r--r-- 3.1k cassowary  1 Jan 12:34  3_KiB
.rw-r--r-- 3.1M cassowary  1 Jan 12:34  3_MiB
.rw-r--r-- 4 cassowary  1 Jan 12:34  4_bytes
.rw-r--r-- 4.1k cassowary  1 Jan 12:34  4_KiB
.rw-r--r-- 4.2M cassowary  1 Jan 12:34  4_MiB
.rw-r--r-- 5 cassowary  1 Jan 12:34  5_bytes
.rw-r--r-- 5.1k cassowary  1 Jan 12:34  5_KiB
.rw-r--r-- 5.2M cassowary  1 Jan 12:34  5_MiB
.rw-r--r-- 6 cassowary  1 Jan 12:34  6_bytes
.rw-r--r-- 6.1k cassowary  1 Jan 12:34  6_KiB
.rw-r--r-- 6.3M cassowary  1 Jan 12:34  6_MiB
.rw-r--r-- 7 cassowary  1 Jan 12:34  7_bytes
.rw-r--r-- 7.2k cassowary  1 Jan 12:34  7_KiB
.rw-r--r-- 7.3M cassowary  1 Jan 12:34  7_MiB
.rw-r--r-- 8 cassowary  1 Jan 12:34  8_bytes
.rw-r--r-- 8.2k cassowary  1 Jan 12:34  8_KiB
.rw-r--r-- 8.4M cassowary  1 Jan 12:34  8_MiB
.rw-r--r-- 9 cassowary  1 Jan 12:34  9_bytes
.rw-r--r-- 9.2k cassowary  1 Jan 12:34  9_KiB
.rw-r--r-- 9.4M cassowary  1 Jan 12:34  9_MiB
.rw-r--r-- 10 cassowary  1 Jan 12:34  10_bytes
.rw-r--r-- 10k cassowary  1 Jan 12:34  10_KiB
.rw-r--r-- 10M cassowary  1 Jan 12:34  10_MiB
.rw-r--r-- 11 cassowary  1 Jan 12:34  11_bytes
.rw-r--r-- 11k cassowary  1 Jan 12:34  11_KiB
.rw-r--r-- 11M cassowary  1 Jan 12:34  11_MiB
.rw-r--r-- 12 cassowary  1 Jan 12:34  12_bytes
.rw-r--r-- 12k cassowary  1 Jan 12:34  12_KiB
.rw-r--r-- 12M cassowary  1 Jan 12:34  12_MiB
.rw-r--r-- 13 cassowary  1 Jan 12:34  13_bytes
.rw-r--r-- 13k cassowary  1 Jan 12:34  13_KiB
.rw-r--r-- 13M cassowary  1 Jan 12:34  13_MiB
.rw-r--r-- 1 cassowary  1 Jan 12:34  1_bytes
.rw-r--r-- 1.0k cassowary  1 Jan 12:34  1_KiB
.rw-r--r-- 1.0M cassowary  1 Jan 12:34  1_MiB
.rw-r--r-- 2 cassowary  1 Jan 12:34  2_bytes
.rw-r--r-- 2.0k cassowary  1 Jan 12:34  2_KiB
.rw-r--r-- 2.1M cassowary  1 Jan 12:34  2_MiB
.rw-r--r-- 3 cassowary  1 Jan 12:34  3_bytes
.rw-r--r-- 3.1k cassowary  1 Jan 12:34  3_KiB
.rw-r--r-- 3.1M cassowary  1 Jan 12:34  3_MiB
.rw-r--r-- 4 cassowary  1 Jan 12:34  4_bytes
.rw-r--r-- 4.1k cassowary  1 Jan 12:34  4_KiB
.rw-r--r-- 4.2M cassowary  1 Jan 12:34  4_MiB
.rw-r--r-- 5 cassowary  1 Jan 12:34  5_bytes
.rw-r--r-- 5.1k cassowary  1 Jan 12:34  5_KiB
.rw-r--r-- 5.2M cassowary  1 Jan 12:34  5_MiB
.rw-r--r-- 6 cassowary  1 Jan 12:34  6_bytes
.rw-r--r-- 6.1k cassowary  1 Jan 12:34  6_KiB
.rw-r--r-- 6.3M cassowary  1 Jan 12:34  6_MiB
.rw-r--r-- 7 cassowary  1 Jan 12:34  7_bytes
.rw-r--r-- 7.2k cassowary  1 Jan 12:34  7_KiB
.rw-r--r-- 7.3M cassowary  1 Jan 12:34  7_MiB
.rw-r--r-- 8 cassowary  1 Jan 12:34  8_bytes
.rw-r--r-- 8.2k cassowary  1 Jan 12:34  8_KiB
.rw-r--r-- 8.4M cassowary  1 Jan 12:34  8_MiB
.rw-r--r-- 9 cassowary  1 Jan 12:34  9_bytes
.rw-r--r-- 9.2k cassowary  1 Jan 12:34  9_KiB
.rw-r--r-- 9.4M cassowary  1 Jan 12:34  9_MiB
.rw-r--r-- 10 cassowary  1 Jan 12:34  10_bytes
.rw-r--r-- 10k cassowary  1 Jan 12:34  10_KiB
.rw-r--r-- 10M cassowary  1 Jan 12:34  10_MiB
.rw-r--r-- 11 cassowary  1 Jan 12:34  11_bytes
.rw-r--r-- 11k cassowary  1 Jan 12:34  11_KiB
.rw-r--r-- 11M cassowary  1 Jan 12:34  11_MiB
.rw-r--r-- 12 cassowary  1 Jan 12:34  12_bytes
.rw-r--r-- 12k cassowary  1 Jan 12:34  12_KiB
.rw-r--r-- 12M cassowary  1 Jan 12:34  12_MiB
.rw-r--r-- 13 cassowary  1 Jan 12:34  13_bytes
.rw-r--r-- 13k cassowary  1 Jan 12:34  13_KiB
.rw-r--r-- 13M cassowary  1 Jan 12:34  13_MiB

View File

@ -1,39 +1,39 @@
.rw-r--r-- 1 cassowary  1 Jan 12:34  1_bytes
.rw-r--r-- 1.0k cassowary  1 Jan 12:34  1_KiB
.rw-r--r-- 1.0M cassowary  1 Jan 12:34  1_MiB
.rw-r--r-- 2 cassowary  1 Jan 12:34  2_bytes
.rw-r--r-- 2.0k cassowary  1 Jan 12:34  2_KiB
.rw-r--r-- 2.1M cassowary  1 Jan 12:34  2_MiB
.rw-r--r-- 3 cassowary  1 Jan 12:34  3_bytes
.rw-r--r-- 3.1k cassowary  1 Jan 12:34  3_KiB
.rw-r--r-- 3.1M cassowary  1 Jan 12:34  3_MiB
.rw-r--r-- 4 cassowary  1 Jan 12:34  4_bytes
.rw-r--r-- 4.1k cassowary  1 Jan 12:34  4_KiB
.rw-r--r-- 4.2M cassowary  1 Jan 12:34  4_MiB
.rw-r--r-- 5 cassowary  1 Jan 12:34  5_bytes
.rw-r--r-- 5.1k cassowary  1 Jan 12:34  5_KiB
.rw-r--r-- 5.2M cassowary  1 Jan 12:34  5_MiB
.rw-r--r-- 6 cassowary  1 Jan 12:34  6_bytes
.rw-r--r-- 6.1k cassowary  1 Jan 12:34  6_KiB
.rw-r--r-- 6.3M cassowary  1 Jan 12:34  6_MiB
.rw-r--r-- 7 cassowary  1 Jan 12:34  7_bytes
.rw-r--r-- 7.2k cassowary  1 Jan 12:34  7_KiB
.rw-r--r-- 7.3M cassowary  1 Jan 12:34  7_MiB
.rw-r--r-- 8 cassowary  1 Jan 12:34  8_bytes
.rw-r--r-- 8.2k cassowary  1 Jan 12:34  8_KiB
.rw-r--r-- 8.4M cassowary  1 Jan 12:34  8_MiB
.rw-r--r-- 9 cassowary  1 Jan 12:34  9_bytes
.rw-r--r-- 9.2k cassowary  1 Jan 12:34  9_KiB
.rw-r--r-- 9.4M cassowary  1 Jan 12:34  9_MiB
.rw-r--r-- 10 cassowary  1 Jan 12:34  10_bytes
.rw-r--r-- 10k cassowary  1 Jan 12:34  10_KiB
.rw-r--r-- 10M cassowary  1 Jan 12:34  10_MiB
.rw-r--r-- 11 cassowary  1 Jan 12:34  11_bytes
.rw-r--r-- 11k cassowary  1 Jan 12:34  11_KiB
.rw-r--r-- 11M cassowary  1 Jan 12:34  11_MiB
.rw-r--r-- 12 cassowary  1 Jan 12:34  12_bytes
.rw-r--r-- 12k cassowary  1 Jan 12:34  12_KiB
.rw-r--r-- 12M cassowary  1 Jan 12:34  12_MiB
.rw-r--r-- 13 cassowary  1 Jan 12:34  13_bytes
.rw-r--r-- 13k cassowary  1 Jan 12:34  13_KiB
.rw-r--r-- 13M cassowary  1 Jan 12:34  13_MiB
.rw-r--r-- 1 cassowary  1 Jan 12:34  1_bytes
.rw-r--r-- 1.0k cassowary  1 Jan 12:34  1_KiB
.rw-r--r-- 1.0M cassowary  1 Jan 12:34  1_MiB
.rw-r--r-- 2 cassowary  1 Jan 12:34  2_bytes
.rw-r--r-- 2.0k cassowary  1 Jan 12:34  2_KiB
.rw-r--r-- 2.1M cassowary  1 Jan 12:34  2_MiB
.rw-r--r-- 3 cassowary  1 Jan 12:34  3_bytes
.rw-r--r-- 3.1k cassowary  1 Jan 12:34  3_KiB
.rw-r--r-- 3.1M cassowary  1 Jan 12:34  3_MiB
.rw-r--r-- 4 cassowary  1 Jan 12:34  4_bytes
.rw-r--r-- 4.1k cassowary  1 Jan 12:34  4_KiB
.rw-r--r-- 4.2M cassowary  1 Jan 12:34  4_MiB
.rw-r--r-- 5 cassowary  1 Jan 12:34  5_bytes
.rw-r--r-- 5.1k cassowary  1 Jan 12:34  5_KiB
.rw-r--r-- 5.2M cassowary  1 Jan 12:34  5_MiB
.rw-r--r-- 6 cassowary  1 Jan 12:34  6_bytes
.rw-r--r-- 6.1k cassowary  1 Jan 12:34  6_KiB
.rw-r--r-- 6.3M cassowary  1 Jan 12:34  6_MiB
.rw-r--r-- 7 cassowary  1 Jan 12:34  7_bytes
.rw-r--r-- 7.2k cassowary  1 Jan 12:34  7_KiB
.rw-r--r-- 7.3M cassowary  1 Jan 12:34  7_MiB
.rw-r--r-- 8 cassowary  1 Jan 12:34  8_bytes
.rw-r--r-- 8.2k cassowary  1 Jan 12:34  8_KiB
.rw-r--r-- 8.4M cassowary  1 Jan 12:34  8_MiB
.rw-r--r-- 9 cassowary  1 Jan 12:34  9_bytes
.rw-r--r-- 9.2k cassowary  1 Jan 12:34  9_KiB
.rw-r--r-- 9.4M cassowary  1 Jan 12:34  9_MiB
.rw-r--r-- 10 cassowary  1 Jan 12:34  10_bytes
.rw-r--r-- 10k cassowary  1 Jan 12:34  10_KiB
.rw-r--r-- 10M cassowary  1 Jan 12:34  10_MiB
.rw-r--r-- 11 cassowary  1 Jan 12:34  11_bytes
.rw-r--r-- 11k cassowary  1 Jan 12:34  11_KiB
.rw-r--r-- 11M cassowary  1 Jan 12:34  11_MiB
.rw-r--r-- 12 cassowary  1 Jan 12:34  12_bytes
.rw-r--r-- 12k cassowary  1 Jan 12:34  12_KiB
.rw-r--r-- 12M cassowary  1 Jan 12:34  12_MiB
.rw-r--r-- 13 cassowary  1 Jan 12:34  13_bytes
.rw-r--r-- 13k cassowary  1 Jan 12:34  13_KiB
.rw-r--r-- 13M cassowary  1 Jan 12:34  13_MiB

View File

@ -1,40 +1,40 @@
drwxrwxr-x - vagrant 18 Oct 00:18  /testcases/files
.rw-r--r-- 1 cassowary  1 Jan 12:34 ├──  1_bytes
.rw-r--r-- 1.0k cassowary  1 Jan 12:34 ├──  1_KiB
.rw-r--r-- 1.0M cassowary  1 Jan 12:34 ├──  1_MiB
.rw-r--r-- 2 cassowary  1 Jan 12:34 ├──  2_bytes
.rw-r--r-- 2.0k cassowary  1 Jan 12:34 ├──  2_KiB
.rw-r--r-- 2.1M cassowary  1 Jan 12:34 ├──  2_MiB
.rw-r--r-- 3 cassowary  1 Jan 12:34 ├──  3_bytes
.rw-r--r-- 3.1k cassowary  1 Jan 12:34 ├──  3_KiB
.rw-r--r-- 3.1M cassowary  1 Jan 12:34 ├──  3_MiB
.rw-r--r-- 4 cassowary  1 Jan 12:34 ├──  4_bytes
.rw-r--r-- 4.1k cassowary  1 Jan 12:34 ├──  4_KiB
.rw-r--r-- 4.2M cassowary  1 Jan 12:34 ├──  4_MiB
.rw-r--r-- 5 cassowary  1 Jan 12:34 ├──  5_bytes
.rw-r--r-- 5.1k cassowary  1 Jan 12:34 ├──  5_KiB
.rw-r--r-- 5.2M cassowary  1 Jan 12:34 ├──  5_MiB
.rw-r--r-- 6 cassowary  1 Jan 12:34 ├──  6_bytes
.rw-r--r-- 6.1k cassowary  1 Jan 12:34 ├──  6_KiB
.rw-r--r-- 6.3M cassowary  1 Jan 12:34 ├──  6_MiB
.rw-r--r-- 7 cassowary  1 Jan 12:34 ├──  7_bytes
.rw-r--r-- 7.2k cassowary  1 Jan 12:34 ├──  7_KiB
.rw-r--r-- 7.3M cassowary  1 Jan 12:34 ├──  7_MiB
.rw-r--r-- 8 cassowary  1 Jan 12:34 ├──  8_bytes
.rw-r--r-- 8.2k cassowary  1 Jan 12:34 ├──  8_KiB
.rw-r--r-- 8.4M cassowary  1 Jan 12:34 ├──  8_MiB
.rw-r--r-- 9 cassowary  1 Jan 12:34 ├──  9_bytes
.rw-r--r-- 9.2k cassowary  1 Jan 12:34 ├──  9_KiB
.rw-r--r-- 9.4M cassowary  1 Jan 12:34 ├──  9_MiB
.rw-r--r-- 10 cassowary  1 Jan 12:34 ├──  10_bytes
.rw-r--r-- 10k cassowary  1 Jan 12:34 ├──  10_KiB
.rw-r--r-- 10M cassowary  1 Jan 12:34 ├──  10_MiB
.rw-r--r-- 11 cassowary  1 Jan 12:34 ├──  11_bytes
.rw-r--r-- 11k cassowary  1 Jan 12:34 ├──  11_KiB
.rw-r--r-- 11M cassowary  1 Jan 12:34 ├──  11_MiB
.rw-r--r-- 12 cassowary  1 Jan 12:34 ├──  12_bytes
.rw-r--r-- 12k cassowary  1 Jan 12:34 ├──  12_KiB
.rw-r--r-- 12M cassowary  1 Jan 12:34 ├──  12_MiB
.rw-r--r-- 13 cassowary  1 Jan 12:34 ├──  13_bytes
.rw-r--r-- 13k cassowary  1 Jan 12:34 ├──  13_KiB
.rw-r--r-- 13M cassowary  1 Jan 12:34 └──  13_MiB
drwxrwxr-x - vagrant 18 Oct 00:18  /testcases/files
.rw-r--r-- 1 cassowary  1 Jan 12:34 ├──  1_bytes
.rw-r--r-- 1.0k cassowary  1 Jan 12:34 ├──  1_KiB
.rw-r--r-- 1.0M cassowary  1 Jan 12:34 ├──  1_MiB
.rw-r--r-- 2 cassowary  1 Jan 12:34 ├──  2_bytes
.rw-r--r-- 2.0k cassowary  1 Jan 12:34 ├──  2_KiB
.rw-r--r-- 2.1M cassowary  1 Jan 12:34 ├──  2_MiB
.rw-r--r-- 3 cassowary  1 Jan 12:34 ├──  3_bytes
.rw-r--r-- 3.1k cassowary  1 Jan 12:34 ├──  3_KiB
.rw-r--r-- 3.1M cassowary  1 Jan 12:34 ├──  3_MiB
.rw-r--r-- 4 cassowary  1 Jan 12:34 ├──  4_bytes
.rw-r--r-- 4.1k cassowary  1 Jan 12:34 ├──  4_KiB
.rw-r--r-- 4.2M cassowary  1 Jan 12:34 ├──  4_MiB
.rw-r--r-- 5 cassowary  1 Jan 12:34 ├──  5_bytes
.rw-r--r-- 5.1k cassowary  1 Jan 12:34 ├──  5_KiB
.rw-r--r-- 5.2M cassowary  1 Jan 12:34 ├──  5_MiB
.rw-r--r-- 6 cassowary  1 Jan 12:34 ├──  6_bytes
.rw-r--r-- 6.1k cassowary  1 Jan 12:34 ├──  6_KiB
.rw-r--r-- 6.3M cassowary  1 Jan 12:34 ├──  6_MiB
.rw-r--r-- 7 cassowary  1 Jan 12:34 ├──  7_bytes
.rw-r--r-- 7.2k cassowary  1 Jan 12:34 ├──  7_KiB
.rw-r--r-- 7.3M cassowary  1 Jan 12:34 ├──  7_MiB
.rw-r--r-- 8 cassowary  1 Jan 12:34 ├──  8_bytes
.rw-r--r-- 8.2k cassowary  1 Jan 12:34 ├──  8_KiB
.rw-r--r-- 8.4M cassowary  1 Jan 12:34 ├──  8_MiB
.rw-r--r-- 9 cassowary  1 Jan 12:34 ├──  9_bytes
.rw-r--r-- 9.2k cassowary  1 Jan 12:34 ├──  9_KiB
.rw-r--r-- 9.4M cassowary  1 Jan 12:34 ├──  9_MiB
.rw-r--r-- 10 cassowary  1 Jan 12:34 ├──  10_bytes
.rw-r--r-- 10k cassowary  1 Jan 12:34 ├──  10_KiB
.rw-r--r-- 10M cassowary  1 Jan 12:34 ├──  10_MiB
.rw-r--r-- 11 cassowary  1 Jan 12:34 ├──  11_bytes
.rw-r--r-- 11k cassowary  1 Jan 12:34 ├──  11_KiB
.rw-r--r-- 11M cassowary  1 Jan 12:34 ├──  11_MiB
.rw-r--r-- 12 cassowary  1 Jan 12:34 ├──  12_bytes
.rw-r--r-- 12k cassowary  1 Jan 12:34 ├──  12_KiB
.rw-r--r-- 12M cassowary  1 Jan 12:34 ├──  12_MiB
.rw-r--r-- 13 cassowary  1 Jan 12:34 ├──  13_bytes
.rw-r--r-- 13k cassowary  1 Jan 12:34 ├──  13_KiB
.rw-r--r-- 13M cassowary  1 Jan 12:34 └──  13_MiB

View File

@ -1,39 +1,39 @@
1_bytes
1_KiB
1_MiB
2_bytes
2_KiB
2_MiB
3_bytes
3_KiB
3_MiB
4_bytes
4_KiB
4_MiB
5_bytes
5_KiB
5_MiB
6_bytes
6_KiB
6_MiB
7_bytes
7_KiB
7_MiB
8_bytes
8_KiB
8_MiB
9_bytes
9_KiB
9_MiB
10_bytes
10_KiB
10_MiB
11_bytes
11_KiB
11_MiB
12_bytes
12_KiB
12_MiB
13_bytes
13_KiB
13_MiB
 1_bytes
 1_KiB
 1_MiB
 2_bytes
 2_KiB
 2_MiB
 3_bytes
 3_KiB
 3_MiB
 4_bytes
 4_KiB
 4_MiB
 5_bytes
 5_KiB
 5_MiB
 6_bytes
 6_KiB
 6_MiB
 7_bytes
 7_KiB
 7_MiB
 8_bytes
 8_KiB
 8_MiB
 9_bytes
 9_KiB
 9_MiB
 10_bytes
 10_KiB
 10_MiB
 11_bytes
 11_KiB
 11_MiB
 12_bytes
 12_KiB
 12_MiB
 13_bytes
 13_KiB
 13_MiB

View File

@ -1,40 +1,40 @@
 /testcases/files
├──  1_bytes
├──  1_KiB
├──  1_MiB
├──  2_bytes
├──  2_KiB
├──  2_MiB
├──  3_bytes
├──  3_KiB
├──  3_MiB
├──  4_bytes
├──  4_KiB
├──  4_MiB
├──  5_bytes
├──  5_KiB
├──  5_MiB
├──  6_bytes
├──  6_KiB
├──  6_MiB
├──  7_bytes
├──  7_KiB
├──  7_MiB
├──  8_bytes
├──  8_KiB
├──  8_MiB
├──  9_bytes
├──  9_KiB
├──  9_MiB
├──  10_bytes
├──  10_KiB
├──  10_MiB
├──  11_bytes
├──  11_KiB
├──  11_MiB
├──  12_bytes
├──  12_KiB
├──  12_MiB
├──  13_bytes
├──  13_KiB
└──  13_MiB
 /testcases/files
├──  1_bytes
├──  1_KiB
├──  1_MiB
├──  2_bytes
├──  2_KiB
├──  2_MiB
├──  3_bytes
├──  3_KiB
├──  3_MiB
├──  4_bytes
├──  4_KiB
├──  4_MiB
├──  5_bytes
├──  5_KiB
├──  5_MiB
├──  6_bytes
├──  6_KiB
├──  6_MiB
├──  7_bytes
├──  7_KiB
├──  7_MiB
├──  8_bytes
├──  8_KiB
├──  8_MiB
├──  9_bytes
├──  9_KiB
├──  9_MiB
├──  10_bytes
├──  10_KiB
├──  10_MiB
├──  11_bytes
├──  11_KiB
├──  11_MiB
├──  12_bytes
├──  12_KiB
├──  12_MiB
├──  13_bytes
├──  13_KiB
└──  13_MiB

View File

@ -1,10 +1,10 @@
 broken -> nowhere
 current_dir -> .
 forbidden -> /proc/1/root
 itself -> itself
 parent_dir -> ..
 root -> /
some_file
 some_file_absolute -> /testcases/links/some_file
 some_file_relative -> some_file
 usr -> /usr
 broken -> nowhere
 current_dir -> .
 forbidden -> /proc/1/root
 itself -> itself
 parent_dir -> ..
 root -> /
 some_file
 some_file_absolute -> /testcases/links/some_file
 some_file_relative -> some_file
 usr -> /usr

View File

@ -0,0 +1,10 @@
broken -> nowhere
current_dir -> .
forbidden -> /proc/1/root
itself -> itself
parent_dir -> ..
root -> /
some_file
some_file_absolute -> /testcases/links/some_file
some_file_relative -> some_file
usr -> /usr

View File

@ -0,0 +1,10 @@
 broken -> nowhere
 current_dir -> .
 forbidden -> /proc/1/root
 itself -> itself
 parent_dir -> ..
 root -> /
 some_file
 some_file_absolute -> /testcases/links/some_file
 some_file_relative -> some_file
 usr -> /usr

View File

@ -0,0 +1,10 @@
 broken -> nowhere
 current_dir -> .
 forbidden -> /proc/1/root
 itself -> itself
 parent_dir -> ..
 root -> /
 some_file
 some_file_absolute -> /testcases/links/some_file
 some_file_relative -> some_file
 usr -> /usr

View File

@ -1,22 +1,22 @@
000
001
002
004
010
020
040
 100
200
400
644
 755
 777
1000
1001
2000
2010
4000
 4100
7666
 7777
 forbidden-directory
 000
 001
 002
 004
 010
 020
 040
 100
 200
 400
 644
 755
 777
 1000
 1001
 2000
 2010
 4000
 4100
 7666
 7777
 forbidden-directory