GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — bug: vim.fn.system fails to execute commands in nushell · Issue #471 · nvim-java/nvim-java

bug: vim.fn.system fails to execute commands in nushell #471

New issue
Copy link
New issue
Copy link
Open
Open
bug: vim.fn.system fails to execute commands in nushell#471
Copy link
Labels
bugSomething isn't workingSomething isn't working

Description

@Solaestas
Solaestas
opened on Jan 26, 2026
Issue body actions

Did you check docs and existing issues?

  • I have read all the plugin docs
  • I have searched the existing issues
  • I have searched the existing issues of plugins related to this issue

Neovim version (nvim -v)

0.11.5

Operating system/version

Windows/25H2

Describe the bug

When using Nushell as the system shell, the downloader and extractor modules in nvim-java fail to work. The issue stems from using vim.fn.system(cmd) to execute commands, which passes the entire command string to the system shell for parsing. In non-traditional shells like Nushell, this causes argument parsing errors or command execution failures.

Steps To Reproduce

  1. Set nushell as the default nvim shell
  2. Install and load nvim-java

Expected Behavior

The plugin should work correctly in nushell. Using Neovim 0.10+'s vim.system() API with argument arrays would avoid shell parsing issues.

example

	local pwsh_cmd = string.format(
		'iwr -TimeoutSec %d -UseBasicParsing -Method "GET" -Uri %q -OutFile %q;',
		self.timeout,
		self.url,
		self.dest
	)

	local cmd = string.format(
		-- luacheck: ignore
		"%s -NoProfile -NonInteractive -Command \"$ProgressPreference = 'SilentlyContinue'; $ErrorActionPreference = 'Stop'; [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; %s\"",
		pwsh,
		pwsh_cmd
	)
	log.debug('PowerShell command:', cmd)

	local result = vim.fn.system(cmd)
	local result = vim.system({
		"pwsh",
		"-NoProfile",
		"-NonInteractive",
		"-Command",
		"$ProgressPreference = 'SilentlyContinue';",
		"$ErrorActionPreference = 'Stop';",
		"[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12;",
		"iwr",
		"-TimeoutSec",
		tostring(self.timeout),
		"-UseBasicParsing",
		"-Method GET",
		"-Uri",
		self.url,
		"-OutFile",
		self.dest,
	}):wait()

Activity

  1. Solaestas
    added
    bugSomething isn't workingSomething isn't working
    on Jan 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402503 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.