lualine.nvim icon indicating copy to clipboard operation
lualine.nvim copied to clipboard

Bug: Filetype icon for terminal acting weird

Open MarcoBuess opened this issue 8 months ago • 7 comments

Self Checks

  • [x] I'm using the latest lualine. commit 0a5a668
  • [x] I didn't find the issue in existing issues or PRs.

How to reproduce the problem

Launching a terminal with term and thus starting vim.opt.shell will result in this filetype icon. image

Expected behaviour

Launching a terminal with term pwsh will yield the expected result. image

I don't quite get the difference other than that term pwsh will spawn 2 instances of pwsh as oppsed to term which will spawn just one instance of pwsh. In both cases filetype will be set to terminal by an autocommand. I tried several filetypes in the term session, but the icon didn't change. It also behaves the same for me no matter what shell you set. I even tried cmd.

Minimal config to reproduce the issue

-- Shell
vim.opt.shell = fn.executable("pwsh") and "pwsh" or "powershell"
vim.opt.shellcmdflag =
"-NonInteractive -NoLogo -NoProfile -ExecutionPolicy RemoteSigned -Command [Console]::InputEncoding=[Console]::OutputEncoding=[System.Text.Encoding]::UTF8;$PSStyle.OutputRendering = [System.Management.Automation.OutputRendering]::PlainText;"
vim.opt.shellpipe = '2>&1 | %{ "$_" } | Tee-Object %s; exit $LastExitCode'
vim.opt.shellquote = ""
vim.opt.shellredir = '2>&1 | %{ "$_" } | Out-File %s; exit $LastExitCode'
vim.opt.shellxquote = ""

Additional information

OS: Windows 11 (10.0.22631) Neovim: v0.10.0, Release, LuaJIT 2.1.1713484068 lualine: 0a5a668 Terminal: Windows Terminal v1.20.11381.0

MarcoBuess avatar Jun 05 '24 20:06 MarcoBuess