-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Shows me absolutely nothing #155
Comments
Can you try |
Yes, the only thing that would cause this is if it's a new git repo. If that's not the case please post your configuration and the repo you're having issues with if possible. |
First, thanks for the super-speedy reply: I didn't expect that at all on a holiday, and Happy New Year to y'all while I'm at it! Second, in answer to your questions, yes, the Speaking of which, I refer you to the FlogDebug repo I just created on GitHub which both (1) provides you my current Neovim configuration, and (2) serves as a repo that has the problem. I added a simple readme to explain the steps to reproduce the problem. And I suppose I should say: please be gentle! I've been using Vim for decades, but I've only just adopted Neovim over the last couple months. I'm still working on my configuration and imagine I'm doing all kinds of things wrong. Please let me know if there's something else I can do to help. I think it would be great to be able to use the plugin. Cheers! |
Thank you for providing your config and a repo. Unfortunately, I installed and loaded your config successfully (despite getting some warnings) but still could not reproduce the issue. Apologies for the difficulty getting to the bottom of this. I opened What do you get from these commands?
|
Well I guess that's good news at least! I'm glad to hear the plugin works just fine with my config. Now I just have to figure out why it's not working for me, which is weird. For sake of reference, I'm running Neovim on my Windows 11 Pro x64 PC. The versions of the tools you mention are as follows, copied/pasted from my Windows terminal:
Does that help? |
Aha! Now I'm getting somewhere! When I use Neovim in either CMD or PowerShell, your plugin works perfectly. But when I launch the Windows Terminal app, it fails with an empty screen every time. That gives me a starting point to investigate further on my end as I believe the underlying favorite terminal application that's launching is TCC by JP Software. I've been using it for years on Windows to give me aliases, directory stacks, better batch files, and most of what I'm used to having on Linux or macOS that Windows is still (pathetically) missing. I'll dig into your plugin code to see if I can find the specific shell commands being issued; it's probably got something to do with those. Any advice/pointers would be helpful. |
Does Fugitive work with your terminal? If you run |
I don't think I've ever used that command before, but yes, it works in the Windows Terminal directly (running TCC to be clear, the one shell that apparently doesn't work properly with the Flog plugin) and with |
It is likely a special character used in the log command. You can copy the last used log command in the Flog window by running this command:
If you run this in your terminal you may be able to narrow down what's causing issues. Though, when Flog runs this command, it uses local handle = io.popen("<paste here>")
for line in handle:lines() do
print(line)
end In my terminal, I have to redirect the output to a paginator to view it properly:
I'm not sure what the proper way to do this for your terminal is. Here's what that output should look like: Here, my paginator is changing escape characters to If you want to narrow it down even further on your own, the problem is likely in the shell escaping logic, which you can find in |
Bingo! I was able to retrieve the command with the helpful information you provided. It runs fine in CMD and PowerShell, but when I run the same command in TCC, I get the following error immediately: I confess I'm not familiar with what's going wrong there, though maybe it's just plain old string escaping? Thanks in advance for any thoughts. I've filed an issue with the JP Software support forums as well. I imagine one way or another I'll get it working. UPDATE: Finally found a way to copy the output of the command as text:
|
Flog should be giving an error if a shell command fails. I'm not sure what settings you should be using in Neovim for your shell but it should work assuming it is supported and set up right. Settings can impact how escaping characters works in Flog as well, so I would recommend finding how the various shell settings should be configured in Vim/Neovim. There are various settings for shells that start with shell, starting with |
First, thanks for acquainting me with those details about configuring a shell for Neovim. I had no idea I even needed to do that. I can't find any information specifically on using TCC with it, but maybe I can poke around a bit and see if piping options or things like that make a difference. FWIW, the author of the TCC software says the command is a bit odd but shouldn't present any parsing problems for TCC. He also offered me a workaround I've embraced, which I'll explain here for others' sake. To wit, he suggested I change the COMSPEC environment variable to a shell that works (e.g., CMD) before running Neovim and then change it back after I'm done. I wrapped this all in a simple
That lets the Flog plugin run just fine within Neovim. I suspect he's got some kind of interpreter issue that's barfing on that command for some reason, but that workaround has me up and "flogging away", so to speak. Sorry, I couldn't help the bad pun! |
@JohnWilliston it doesn't make sense to me that you should care what terminal NeoVim is run inside of. When I was stuck with Windows at a previous job, I started NeoVim natively, and then ran a MinGW bash shell inside of that via a binding. What difference does it make to run NeoVim from TCC rather than from CMD ? |
Special characters, usually... it's probably the same in this case but it looks like it might be having a problem with quoting too. |
Because I try to live in the terminal as much as possible, and CMD is the most pathetic shell of all in my experience. TCC offers almost perfect compatibility with it (cases like this one being weird exceptions) yet also adds:
And more stuff I'm sure I'm forgetting. You're right that I could use Bash through various means, not the least of which being WSL2 these days, but I'm trying to stick with a do-everything environment rather than live in multiple shells for different purposes. TCC is the only one I know that can do it all. |
WSL2 can be slow. I don't want to force anyone to use a particular terminal with Flog, but also it is hard to support Windows because I don't have any desire to set up a bunch of shells on Windows... Sorry for the difficulty. |
I don't blame you one bit! The day I can stop using Windows is the day I do stop using Windows. You've been very helpful as it is, more so than I anticipated. And if I haven't already said it, thanks for writing the plugin in the first place! It's great to be able to use it. I still have a lot to learn, but maybe I can ditch my Git GUI (GitKraken) with all the features Flog provides. |
@JohnWilliston I'm not suggesting you switch from TCC, but rather that you open NeoVim first (with a desktop shortcut or any other means than inside TCC), and then open TCC inside of NeoVim. It will have the added benefit of being able to use NeoVim as a terminal multiplexer, since terminal buffers are just buffers like any other, so you can put them in tabs & splits, or even run things without any opened view and use fzf's I made a tiny plugin vim-termhere; it was explicitly designed to reduce the differences for me between linux and windows work, as well as reduce the friction in using |
I'll give your plugin a look. To date (as you can see if you reviewed my config) I've been fiddling around trying to get toggleterm and the toggleterm manager to work for me, and I had to take a few steps to get it to launch terminals using TCC as the shell. It's so much easier for me on Linux or macOS: I typically just use tmux and work seamlessly with Neovim inside one of its panes. But Windows is an incompetent nightmare mess by comparison. I confess, though, it hadn't yet occurred to me to try using Neovim as the authoritative terminal multiplexer. That's an interesting notion. I find using terminals in Neovim a bit rough around the edges when you want more than one, but maybe I could get that to work for me. Thanks for the suggestion. |
I feel like I must be missing the obvious completely. I added the sample configuration for the plugin to my Lazy setup, the plugin installed successfully, I changed directory to inside a Git repo, opened a file, and the
:Flog
and:FlogSplit
commands work fine by show me absolutely nothing as a result. Any ideas? The tool looks great, but I have no idea why it's not doing anything.The text was updated successfully, but these errors were encountered: