onivim/oni

Feature - Command Palette: Allow specifying arguments for commands

Open

#1.960 geöffnet am 28. März 2018

Auf GitHub ansehen
 (1 Kommentar) (0 Reaktionen) (0 zugewiesene Personen)TypeScript (336 Forks)batch import
enhancementhelp wantedinsider

Repository-Metriken

Stars
 (11.389 Stars)
PR-Merge-Metriken
 (Keine gemergten PRs in 30 T)

Beschreibung

This came up in the context of #1947 - it'd be really convenient when opening a browser window to specify a URL, directly from the command palette:

For example, if I start typing bro and then a space and then http://onivim.io, that would make opening a web browser much more convenient.

Today, we can't do that, since our fuzzy filtering tries to match the whole search string: args-to-command

To implement this, we might need to add a custom filter strategy for the command palette window (such that it only uses the first token in the string), and then update the Tasks provider (which backs the command palette) to send back any arguments. That code is around here: https://github.com/onivim/oni/blob/8186d0ba5754282b81464748355ad702d5a4f8e5/browser/src/Services/Tasks.ts#L78

Contributor Guide