 Release Notes: - Improved tasks modal by highlighting a distinction between a task template and concrete task instance and surfacing available keybindings more prominently. Task templates are now always available in the modal, even if there's already a history entry with the same label. - Changed default key binding for "picker::UseSelectedQuery" to `opt-e`.
18 lines
620 B
Rust
18 lines
620 B
Rust
use language::ContextProviderWithTasks;
|
|
use task::{TaskTemplate, TaskTemplates, VariableName};
|
|
|
|
pub(super) fn bash_task_context() -> ContextProviderWithTasks {
|
|
ContextProviderWithTasks::new(TaskTemplates(vec![
|
|
TaskTemplate {
|
|
label: "execute selection".to_owned(),
|
|
command: VariableName::SelectedText.template_value(),
|
|
..TaskTemplate::default()
|
|
},
|
|
TaskTemplate {
|
|
label: format!("run '{}'", VariableName::File.template_value()),
|
|
command: VariableName::File.template_value(),
|
|
..TaskTemplate::default()
|
|
},
|
|
]))
|
|
}
|