Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>populate-quickPickNew to Visual Studio Code? Get it now.
populate-quickPick

populate-quickPick

wiesoauch

|
49 installs
| (0) | Free
populate a QuickPick from a file
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

quickPickFromFile

This extension generates a QuickPick. The options are provided in a file. It returns the selection for further use.

Usage

Dynamically creates options for a QuickPick in custom VSC tasks.

For example in your sample.code-workspace:

	"tasks": {
		"version": "2.0.0",
		"tasks": [
			{
				"label": "My Task",
				"type": "shell",
				"command": "echo", // your command here
				"args": [
					"${input:pickDemo}"
				],
				"problemMatcher": []
			}
		],
		"inputs": [
			{
				"id": "pickDemo",
				"type": "command",
				"command": "populate-quickpick.quickPickFromFile"
			}
		]

If you call the task My Task, a QuickPick window will appear. It lists the options provided in myFile. The selected option is then echoed.

This allows to easily pass an argument from within VSC to a python script and much more.

"command": "python",
"args": [
    "script.py",
	"--arg",
    "${input:pickDemo}"
    ]

myFile Details

  • path to file

    • must be created as such <workspacePath>/scripts/temp/available_headers.txt
    • the extension adapts automatically to the workspace you are in
  • format

    • every line is listed as one option in the QuickPick window
    • the file is split with the \n character
option 1
option 2
... 

TODO

  • [ ] add file path as option in user settings
  • [ ] ensure cross-platform compatibility for line split
  • [ ] make extension run not only for workspaces but also without a workspace
  • [ ] allow a hierarchy of topics
  • [ ] make nested QuickPicks available for different hierarchy topics like shown in the QuickInput examples

Links

  • What is a QuickPick?
  • QuickInput examples from VSC
  • Original idea of how to populate a pickString dynamically within a task using an extension
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft