Yash-Handa / logo-ls

Modern ls command with vscode like File Icon and Git Integrations. Written in Golang
MIT License
1.13k stars 46 forks source link

implementing branch display in git status mode #9

Closed FalcoSuessgott closed 3 years ago

FalcoSuessgott commented 3 years ago

I tried to implement the displaying of the current checked out branch of git directory when using logo-ls is -D:

$> logo-ls -lD
...
-rw-rw-r--⠀Tom Morelly⠀morelly_t1⠀9211 ⠀Sep 23 21:44:31⠀ﳑ  ⠀main.go⠀   ⠀
-rw-rw-r--⠀Tom Morelly⠀morelly_t1⠀16079⠀Sep 23 20:57:30⠀  ⠀README.md⠀   ⠀
drwxrwxr-x⠀Tom Morelly⠀morelly_t1⠀4096 ⠀Sep 23 22:09:02⠀  ⠀test/⠀   ⠀
drwxrwxr-x⠀Tom Morelly⠀morelly_t1⠀4096 ⠀Sep 23 22:04:56⠀  ⠀tmp/⠀●  ⠀testbranch

unfortunately the icons are now not displays as before:

imgf

Maybe u can help me fixing the rendering of the icons?

Yash-Handa commented 3 years ago

Thanks very much for the Pull request, But I think it would be nice if the current Branch is displayed at the top or bottom of the command output.

Basically, there would be no point displaying the same branch-name for all the files/ dir that have been modified. If 5 files have been Modified/ Added then all 5 will be showing the same branch info (currently checked out branch.) It would be nice if the branch info is displayed separately at the top/bottom of currently displayed directory.

FalcoSuessgott commented 3 years ago

Hi,

Basically, there would be no point displaying the same branch-name for all the files/ dir that have been modified.

I agree that this would be nonsense. I intended to display the branchname only for root git directories in the current or specified directory. For files the branchname isnt displayed. See the screenshot:

It would be nice if the branch info is displayed separately at the top/bottom of currently displayed directory.

Yes that would be nice when using logo-ls -DR. I could implement that aswell.

Do you have an idea for the wrong colors when rendering the icons?