Doesn't work if aliased with --startuptime in shell
I have an alias with neovim as nvim --startuptime /tmp/nvim-startuptime because I have something to read startuptime onto my dashboard. This breaks vim-startuptime.
Hi @pollen00, can you provide details on (1) the error message you're encountering (and/or any other information on how vim-staruptime is breaking), (2) details on how you have the alias set up, and (3) if relevant, information about the dashboard?
The error is just the "Is vim-startuptime stuck on 0% progress?" screen. I can run neovim in a nested terminal just fine, and the screen goes away and everything works once I remove the alias. The alias is set through my zshrc.
I'm not sure what could be causing the issue.
I've updated vim-startuptime to include additional debugging information on the screen you're stuck on.
It should now include something like the following (this is what's shown for me, which quickly disappears since I don't encounter any issue):
It may help to run a nested instance of (n)vim in a manner similar
to vim-startuptime. The following lines show the shell-escaped
program and arguments used by vim-startuptime. <OUTPUT> should be
replaced with an output file.
'/usr/bin/vim.gtk3'
'--startuptime'
'<OUTPUT>'
'-c'
'if exists('\''*timer_start'\'') | call timer_start(0, {-> execute('\''qall!'\'')}) | else | autocmd VimEnter * qall! | endif'
Can you post that information here and/or try running a nested Neovim with the program and arguments from the information that's shown for you (if so, be sure to replace <OUTPUT> with a real file path for saving the startuptime output)?
This is what's shown in the 0% menu.
'/usr/bin/nvim'
'--startuptime'
'<OUTPUT>'
'-c'
'if exists('\''*timer_start'\'') | call timer_start(0, {-> execute('\''qall!'\'')}) | else | autocmd VimEnter * qall! | endif'
Trying to run with those arguments just spits out error detected while processing command line: so I think there might be something wrong with all of the single quotes in -c
The arguments are shell-escaped, so I'm not sure what's causing the problem. Does the following command run from a :terminal within Neovim?
/usr/bin/nvim --startuptime startuptime_output -c 'if exists('\''*timer_start'\'') | call timer_start(0, {-> execute('\''qall!'\'')}) | else | autocmd VimEnter * qall! | endif'
It runs, flashes for a sec, and then returns to the :terminal. Nothing is printed out to the console.
That's the working behavior. I thought maybe there would be a notification of some error.
Can you share the alias command? I'll try to reproduce by matching your configuration.
It's just alias nvim="nvim --startuptime /tmp/nvim-startuptime"