toland / qlmarkdown

QuickLook generator for Markdown files.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Doesn't work with QL from the terminal

chaosmind opened this issue · comments

This is an edge-case, but... I like to use QuickLook from the Terminal. This is "qlmanage -p", but there's a handy alias for both .bashrc and .zshrc:
ql () { qlmanage -p "$*" >& /dev/null; }
(no preceding "alias" required for either).

qlmarkdown definitely adds QuickLook support for MD files from the Finder (thanks!), but this seems to break from the command line... Causes both zsh and bash to hang, in both Terminal and iTerm2.

Being able to QuickLook an MD file from the terminal immediately after having pulled down a git repo would be nirvana!

This sounds like an interesting use case, but I have no idea what would be necessary to make it work.

commented

I have QLStephen and QLMarkdown installed.
QLMarkdown prevents qlmanage -p text.txt from displaying the Quick Look window.
QLStephen alone does not affect this command, but QLMarkdown alone does.
Is it possible to check the differences in between?

Sorry I'm not a developer. Just hope this information can somewhat help.

There doesn't seem to be any meaningful debug output from qlmanage, but it will reliably fail to generate a preview. If you wait long enough a thumbnail is eventually rendered, as sometimes happens when QL crashes.

[DEBUG] Previewing file:///private/tmp/README.md. Content type UTI: net.daringfireball.markdown. Generator used: <QLGenerator /Library/QuickLook/QLMarkdown.qlgenerator> [DEBUG] Loading <QLGenerator /Library/QuickLook/QLMarkdown.qlgenerator> [DEBUG] Previewing file:///private/tmp/README.md finished [DEBUG] Thumbnailing README.md -- file:///private/tmp/ - type: net.daringfireball.markdown - generator: <QLGenerator /Library/QuickLook/QLMarkdown.qlgenerator> (try #1) [DEBUG] Thumbnailing file:///private/tmp/README.md. Content type UTI: net.daringfireball.markdown. Generator used: <QLGenerator /Library/QuickLook/QLMarkdown.qlgenerator> [DEBUG] Thumbnailing file:///private/tmp/README.md finished

Having the same problem here. I use a custom Alfred workflow to render markdown files. Currently I'm using a markdown reader, but it would be awesome to use qlmanage.