mirror of
https://github.com/vale981/tridactyl
synced 2025-03-05 09:31:41 -05:00
Comment alias autocomplete implementation
This commit is contained in:
parent
92cdb3a5f4
commit
eb57556e09
1 changed files with 3 additions and 0 deletions
|
@ -150,8 +150,11 @@ clInput.addEventListener("input", () => {
|
|||
var newCmd = undefined
|
||||
|
||||
// Hacky implementation of aliases for autocompletions
|
||||
// Replaced an alias with its command defined in `config.ts` if it exists
|
||||
let [func,...args] = exstr.trim().split(/\s+/)
|
||||
if (func in Config.get("exaliases")) {
|
||||
// JS by default only replaces the first occurence of the searchstr,
|
||||
// so this should only replace the command and nothing else
|
||||
newCmd = exstr.replace(func, Config.get("exaliases")[func])
|
||||
} else {
|
||||
newCmd = exstr
|
||||
|
|
Loading…
Add table
Reference in a new issue