mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2024-11-21 23:33:21 +01:00
mix-fast: add decriptions to mix-fast completions (#8561)
* feat(mix-fast): include desctiptions (#8561) * feat(mix-fast): improve _mix_generate (no tail, better matching)
This commit is contained in:
parent
1db79f97f5
commit
327ac697c7
@ -12,7 +12,7 @@ _mix_does_task_list_need_generating () {
|
|||||||
}
|
}
|
||||||
|
|
||||||
_mix_generate () {
|
_mix_generate () {
|
||||||
mix help | grep -v 'iex -S' | tail -n +2 | cut -d " " -f 2 > .mix_tasks
|
mix help | grep '^mix [^ ]' | sed -E "s/mix ([^ ]*) *# (.*)/\1:\2/" > .mix_tasks
|
||||||
}
|
}
|
||||||
|
|
||||||
_mix () {
|
_mix () {
|
||||||
@ -21,7 +21,8 @@ _mix () {
|
|||||||
echo "\nGenerating .mix_tasks..." > /dev/stderr
|
echo "\nGenerating .mix_tasks..." > /dev/stderr
|
||||||
_mix_generate
|
_mix_generate
|
||||||
fi
|
fi
|
||||||
compadd `cat .mix_tasks`
|
local tasks=(${(f)"$(cat .mix_tasks)"})
|
||||||
|
_describe 'tasks' tasks
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user