lsd icon indicating copy to clipboard operation
lsd copied to clipboard

lsd not displaying files the same as on linux in FreeBSD

Open ghost opened this issue 6 years ago • 9 comments

Version

lsd 0.16.0

Expected behavior

For lsd to display directories in "wide" display like on my linux machines

Actual behavior

2019-10-01-145652_333x392_scrot

ghost avatar Oct 01 '19 18:10 ghost

Hi @gregf ,thanks for the report.

Can you show a comparison with the classical ls command please? At first glance the layout doesn't seems to bad but it difficult to appreciate it because I don't know the terminal width

Peltoche avatar Oct 29 '19 13:10 Peltoche

ls

ghost avatar Nov 05 '19 23:11 ghost

ls normally displays stuff horizontal by default lsd is not on FreeBSD. On linux it works as expected. Sorry for the spam.

ghost avatar Nov 05 '19 23:11 ghost

I was thinking this info might be useful. Terminal is full screen on my monitor.

tput cols: 165
tput lines 49

ghost avatar Nov 06 '19 02:11 ghost

I think you should wait for #289 and try again. This PR should solve several issues and maybe yours.

Peltoche avatar Nov 06 '19 10:11 Peltoche

I decided to try that branch, with the following command cargo install --git https://github.com/Peltoche/lsd.git --branch use-only-blocks --force and I get the same results where everything is in a column rather than laid out horizontally.

lsd

ghost avatar Nov 14 '19 02:11 ghost

Hum... My second guess is the libc::Isatty function which have decided that your using a tty.

        let tty_available = unsafe { libc::isatty(io::stdout().as_raw_fd()) == 1 };

Maybe you can make some test to check the output of this function for you OS

Peltoche avatar Nov 14 '19 14:11 Peltoche

I'm a go programmer, don't know any rust yet. Could you help me with a test function and I'll get it working from there?

ghost avatar Nov 14 '19 17:11 ghost

As this is a system property and the check is done by an external library it seems to be extremely complicated to write a test.

Peltoche avatar Dec 05 '19 11:12 Peltoche