ls: use show_dir_name to output dir name

This commit is contained in:
Daniel Hofstetter 2023-12-11 09:33:36 +01:00
parent 4442b35370
commit 3dab2b7390

View file

@ -1961,7 +1961,8 @@ pub fn list(locs: Vec<&Path>, config: &Config) -> UResult<()> {
if config.dired {
dired::indent(&mut out)?;
}
writeln!(out, "{}:", path_data.p_buf.display())?;
show_dir_name(&path_data.p_buf, &mut out);
writeln!(out)?;
if config.dired {
// First directory displayed
let dir_len = path_data.display_name.len();