PowerShell of Windows is not supported

Open
#82 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
38/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
powershell, vim
Domain
cli, tooling

Research direction

Start by reproducing the task from task.ini with PowerShell configured as the Vim shell, focusing on the generated cd /D command and the gen_pb.bat invocation. The issue is done when the task changes to the configured directory and runs successfully under PowerShell without the positional-parameter error.

Written by the indexing model from the issue text.

Description

I set PowerShell as the default shell of vim in Windows

if has("win32")
  let &shell='pwsh'
  let &shellcmdflag = '-NoLogo -NoProfile -ExecutionPolicy RemoteSigned -Command [Console]::InputEncoding=[Console]::OutputEncoding=[System.Text.Encoding]::UTF8;'
  let &shellredir = '2>&1 | Out-File -Encoding UTF8 %s; exit $LastExitCode'
  let &shellpipe = '2>&1 | Out-File -Encoding UTF8 %s; exit $LastExitCode'
  set shellquote= shellxquote=
endif

My task.ini config

[gen-pb]
command=.\gen_pb.bat
cwd=$(VIM_ROOT)\tools
output=terminal
save=1

The task is to run $(VIM_ROOT)\toos\gen_pb.bat

Output:

❯ cd /D "C:\Users\shenyu\Documents\work\superWarServer\game\tools"
Set-Location: A positional parameter cannot be found that accepts argument 'C:\Users\shenyu\Documents\work\superWarServer\game\tools'.

I'm guessing cd /D is a CMD command, not PowerShell.

Dominant language
Vim Script
Stars
936
Forks
32
PR merge metrics
No merged PRs in 30d

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from skywind3000/asynctasks.vim

All issues in skywind3000/asynctasks.vim

Similar issues

More CLI issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.