Skip to content

Instantly share code, notes, and snippets.

@aarondill
Last active October 20, 2023 10:33
Show Gist options
  • Save aarondill/bf4d306a1819f1c3acb81d5b2a8f7629 to your computer and use it in GitHub Desktop.
Save aarondill/bf4d306a1819f1c3acb81d5b2a8f7629 to your computer and use it in GitHub Desktop.
Repro of alignment bug introduced in https://github.com/eza-community/eza/pull/318
#!/usr/bin/env bash
function verbose() {
echo "> $*"
"$@"
}
tmp=$(mktemp -d)
echo "tmpdir: $tmp"
touch -- "$tmp/a file with spaces"
for i in {1..40}; do touch -- "$tmp/long-file-name-$i"; done
verbose echo "Broken with quotes and icons"
verbose eza --grid --icons -- "$tmp" # wrong
verbose echo "It works without quotes"
verbose eza --grid --icons --no-quotes -- "$tmp" # right
verbose echo "It seems to work without icons tho..."
verbose eza --grid -- "$tmp" # right?
rm -r "$tmp"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment