athityakumar / colorls

A Ruby gem that beautifies the terminal's ls command, with color and font-awesome icons. :tada:
MIT License
4.92k stars 388 forks source link

Error when combining --gs and --tree #341

Open HarHarLinks opened 4 years ago

HarHarLinks commented 4 years ago

Description

I believe this is a new issue; I could not find a dupe.

There seems to be an issue when combining --gs and --tree, e.g.:

$ colorls --tree --gs -d -a .oh-my-zsh/custom
Found existing alias for "colorls --tree". You should use: "tree"

 └──   A?    plugins/
 │  └────.oh-my-zsh/custom: No such file or directory @ rb_dir_s_empty_p - /home/myself/.oh-my-zsh/custom/somecustompluginfolder

Note the wrong path causing the error, should be: /home/myself/.oh-my-zsh/custom/plugins/somecustompluginfolder.

Works without --gs:

$ colorls --tree -d -a .oh-my-zsh/custom

 └──     plugins/
 │  └────     somecustompluginfolder/
 │  └────     colorls/
 │  └────     git/
 │  └────     you-should-use/
 │  │  └────     .circleci/
 │  │  └────     img/
 │  │  └────     tests/
avdv commented 4 years ago

Hi. Thanks for the report! I am afraid, combining git status and tree is not really supported currently. It was broken before, but my last changes made it worse since it crashes now... :scream:

MensSana commented 4 years ago

Just to mention, on my side (under Cygwin), it works well unless there is a filename with a space or when it reaches the second level depth...