yatli / fvim

Cross platform Neovim front-end UI, built with F# + Avalonia
MIT License
1.29k stars 26 forks source link

--termcmd option not recognized #180

Open rashil2000 opened 3 years ago

rashil2000 commented 3 years ago

I ran the command fvim --termcmd powershell, here's the stacktrace:

Exit code: 1
Exception message: neovim crashed
nvim.exe: Unknown option argument: "--termcmd" More info with "nvim.exe -h"
at Microsoft.FSharp.Core.PrintfModule.PrintFormatToStringThenFail@1433.Invoke(String message) in F:\workspace\_work\1\s\src\fsharp\FSharp.Core\printf.fs:line 1433 at FVim.states.msg_dispatch(Event _arg1) in D:\a\1\s\states.fs:line 285 at FVim.model.Start@146.Invoke(Event _arg1) in D:\a\1\s\model.fs:line 146 at FSharp.Control.Reactive.ObservableModule.subscribe@1674-2.Invoke(T delegateArg0) at System.Reactive.AnonymousSafeObserver`1.OnNext(T value) in /_/Rx.NET/Source/src/System.Reactive/AnonymousSafeObserver.cs:line 44 at System.Reactive.Sink`1.ForwardOnNext(TTarget value) in /_/Rx.NET/Source/src/System.Reactive/Internal/Sink.cs:line 50 at System.Reactive.Concurrency.ObserveOn`1.Context._.OnNextPosted(Object value) in /_/Rx.NET/Source/src/System.Reactive/Concurrency/Synchronization.ObserveOn.cs:line 118 at Avalonia.Threading.AvaloniaSynchronizationContext.<>c__DisplayClass8_0.b__0() at Avalonia.Threading.JobRunner.Job.Avalonia.Threading.JobRunner.IJob.Run() at Avalonia.Threading.JobRunner.RunJobs(Nullable`1 priority) at Avalonia.Win32.Win32Platform.WndProc(IntPtr hWnd, UInt32 msg, IntPtr wParam, IntPtr lParam) at Avalonia.Win32.Interop.UnmanagedMethods.DispatchMessage(MSG& lpmsg) at Avalonia.Win32.Win32Platform.RunLoop(CancellationToken cancellationToken) at Avalonia.Threading.Dispatcher.MainLoop(CancellationToken cancellationToken) at Avalonia.Controls.ApplicationLifetimes.ClassicDesktopStyleApplicationLifetime.Start(String[] args) at FVim.Program.app@126-1.Invoke(Window win) in D:\a\1\s\Program.fs:line 129 at FVim.Program.startMainWindow(FSharpFunc`2 app, ServerOptions serveropts_0, Boolean serveropts_1, Boolean serveropts_2) in D:\a\1\s\Program.fs:line 78 at FVim.Program.Main(String[] args) in D:\a\1\s\Program.fs:line 138
yatli commented 2 years ago

What is the expected behavior?

rashil2000 commented 2 years ago

According to the Readme image it should launch a terminal with powershell (by default it launches with cmd)

yatli commented 2 years ago

Aha. Totally forgot about this :D The arg is actually --terminal-cmd. I'll update the README, thanks!

rashil2000 commented 2 years ago

Unfortunately, it still doesn't work. I've tried

fvim --terminal-cmd pwsh
fvim --terminal --terminal-cmd pwsh
fvim --terminal-cmd pwsh --terminal

All of these just open a blank buffer.

yatli commented 2 years ago

Could you try this: fvim -u NORC +"set mouse=a" +"set noshowmode" +"set laststatus=0" +"set noruler" +"set noshowcmd" +"terminal pwsh"

rashil2000 commented 2 years ago

It opens up cmd in FVim

yatli commented 2 years ago

@rashil2000 updated the line, pls try again

yatli commented 2 years ago

I'm guessing it's some quote escape problem again so that fvim fail to assemble the correct startup args

rashil2000 commented 2 years ago

Yes, now the line works

yatli commented 2 years ago

thanks for confirming. I'll figure out a fix.