martanne / vis

A vi-like editor based on Plan 9's structural regular expressions
Other
4.23k stars 256 forks source link

vis-open: add "/" to each dir entry #845

Closed vkochan closed 4 years ago

vkochan commented 4 years ago

It allows to easy identify if the entry is file or directory.

Signed-off-by: Vadym Kochan vadim4j@gmail.com

vkochan commented 4 years ago

Looks like 'ls -F' should work better here, will re-submit it.

martanne commented 4 years ago

Hi, I don't think the ls based approach is preferable because it also prints other indicators e.g. for symlinks.

Also POSIX does not specify any options for echo.

vkochan commented 4 years ago

So, what about to handle output from "ls" in separate func and append "/" if [ -d ] (actually it was my initial version but -F looked more simpler) ?