mirror of
https://github.com/vale981/tridactyl
synced 2025-03-05 17:41:40 -05:00
Fix #2483: Alias descriptions are not tautological
This commit is contained in:
parent
14e06df469
commit
09bedcb926
1 changed files with 11 additions and 5 deletions
|
@ -68,13 +68,19 @@ export class ExcmdCompletionSource extends Completions.CompletionSourceFuse {
|
|||
.map(([name, fn]) => new ExcmdCompletionOption(name, fn.doc)),
|
||||
)
|
||||
|
||||
// Also add aliases to possible completions
|
||||
const exaliases = Object.keys(config.get("exaliases")).filter(a =>
|
||||
a.startsWith(exstr),
|
||||
)
|
||||
for (const alias of exaliases) {
|
||||
// Also narrow down aliases map to possible completions
|
||||
const exaliasesConfig = config.get("exaliases")
|
||||
const exaliases = Object.keys(exaliasesConfig)
|
||||
.filter(a => a.startsWith(exstr))
|
||||
.reduce((obj, key) => {
|
||||
obj[key] = exaliasesConfig[key]
|
||||
return obj
|
||||
}, {})
|
||||
|
||||
for (const alias of Object.keys(exaliases)) {
|
||||
const cmd = aliases.expandExstr(alias, exaliases)
|
||||
const fn = excmds.getFunction(cmd)
|
||||
|
||||
if (fn) {
|
||||
this.options.push(
|
||||
new ExcmdCompletionOption(
|
||||
|
|
Loading…
Add table
Reference in a new issue