Skip to content

Bug: Filetype icon for terminal acting weird #1253

Open
@MarcoBuess

Description

@MarcoBuess

Self Checks

  • I'm using the latest lualine. commit 0a5a668
  • 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions