glow icon indicating copy to clipboard operation
glow copied to clipboard

Glow doesn't see markdown files. `.gitignore`

Open 4l1fe opened this issue 1 year ago • 3 comments

Describe the bug Trying to browse files recursivelly in a directory

❯ tree .local
.local
├── README.md
└── tasks
    ├── 1.md
    └── 2.md

❯ glow -al .local

I don't know why but recently flag -a allowed me to browse the files with the same command and same directory.

If i make the folder normal, unhidden .local -> local glow works as expected.

Setup Please complete the following information along with version numbers, if applicable.

  • Ubuntu 22.04
  • zsh 5.8.1
  • alacritty 0.9.0
  • tmux 3.2a
  • Locale en_US.UTF-8
  • glow 1.5.1 (ad21129)

To Reproduce

  1. Open files with the command glow -al .local

Expected behavior To browse files.

Screenshots See nothing image

4l1fe avatar Jan 07 '24 14:01 4l1fe

Found Reason

I figured out that glow binary behaves as described when a folder is named either .local or local. All the other derivatives can be seen, for example ..local is seen.

4l1fe avatar Jan 09 '24 01:01 4l1fe

Problem Found

Such a misbehavior! glow simply ignores files and dirs which are in .gitignore! That not even confusing, but irritating haha.

I didn't find any mention about the hidden setting.

4l1fe avatar Jan 09 '24 04:01 4l1fe

This is related to https://github.com/charmbracelet/glow/issues/285. I also find this incredibly annoying and came looking for a similar solution. I don't think this should be the default behavior but even if it is there should be a way to bypass that.

jjspace avatar Feb 02 '24 16:02 jjspace

this is fixed on master.

thanks for the issue, sorry for the delay!

caarlos0 avatar Jul 03 '24 16:07 caarlos0