mirror of
https://github.com/Llewellynvdm/exa.git
synced 2024-09-21 17:59:03 +00:00
Also escape characters in broken symlinks
This commit is contained in:
parent
395f9021ac
commit
f51f5fe202
3
Vagrantfile
vendored
3
Vagrantfile
vendored
@ -176,9 +176,12 @@ Vagrant.configure(2) do |config|
|
||||
echo -ne "#{test_dir}/file-names/new-line-dir: [\\n]" | xargs -0 mkdir
|
||||
echo -ne "#{test_dir}/file-names/new-line-dir: [\\n]/subfile" | xargs -0 touch
|
||||
echo -ne "#{test_dir}/file-names/new-line-dir: [\\n]/another: [\\n]" | xargs -0 touch
|
||||
echo -ne "#{test_dir}/file-names/new-line-dir: [\\n]/broken" | xargs -0 touch
|
||||
|
||||
mkdir "#{test_dir}/file-names/links"
|
||||
ln -s "#{test_dir}/file-names/new-line-dir"*/* "#{test_dir}/file-names/links"
|
||||
|
||||
echo -ne "#{test_dir}/file-names/new-line-dir: [\\n]/broken" | xargs -0 rm
|
||||
EOF
|
||||
|
||||
|
||||
|
@ -59,7 +59,7 @@ impl<'a, 'dir> FileName<'a, 'dir> {
|
||||
bits.push(Style::default().paint(" "));
|
||||
bits.push(self.colours.broken_arrow.paint("->"));
|
||||
bits.push(Style::default().paint(" "));
|
||||
bits.push(self.colours.broken_filename.paint(broken_path.display().to_string()));
|
||||
escape(broken_path.display().to_string(), &mut bits, self.colours.broken_filename, self.colours.control_char.underline());
|
||||
},
|
||||
|
||||
FileTarget::Err(_) => {
|
||||
|
@ -6,7 +6,7 @@ emoji: [🆒] invalid-utf8-4: [<5B>(<28>(] utf-8: pâté
|
||||
escape: [[31m\u{1b}[0m] [1;34mlinks[0m vertical-tab: [[31m\u{b}[0m]
|
||||
|
||||
/testcases/file-names/links:
|
||||
[36manother: [[31m\n[36m][0m [36msubfile[0m
|
||||
[36manother: [[31m\n[36m][0m [36mbroken[0m [36msubfile[0m
|
||||
|
||||
/testcases/file-names/new-line-dir: [\n]:
|
||||
another: [[31m\n[0m] subfile
|
||||
|
@ -16,6 +16,8 @@
|
||||
[38;5;244m│ └──[0m [31m<Error: path somehow contained a NUL?>[0m
|
||||
[38;5;244m├──[0m [1;34mlinks[0m
|
||||
[38;5;244m│ ├──[0m [36manother: [[31m\n[36m][0m [38;5;244m->[0m [36m/testcases/file-names/new-line-dir: [[31m\n[36m]/[0manother: [[31m\n[0m]
|
||||
[38;5;244m│ ├──[0m [36mbroken[0m [31m->[0m [4;31m/testcases/file-names/new-line-dir: [\n]/broken[0m
|
||||
[38;5;244m│ │ └──[0m [31m<No such file or directory (os error 2)>[0m
|
||||
[38;5;244m│ └──[0m [36msubfile[0m [38;5;244m->[0m [36m/testcases/file-names/new-line-dir: [[31m\n[36m]/[0msubfile
|
||||
[38;5;244m├──[0m [1;34mnew-line-dir: [[0m[31m\n[1;34m][0m
|
||||
[38;5;244m│ ├──[0m another: [[31m\n[0m]
|
||||
|
Loading…
Reference in New Issue
Block a user