elanthia-online / illthorn

Electron-based FE
18 stars 10 forks source link

followup fix for aliases #74

Closed ondreian closed 3 years ago

ondreian commented 4 years ago

the recent vimish refactor borked aliases like :c for connect, need to followup fix, maybe add a more comprehensive interface for commands so they're trivially iteratable.

vimish/commands/connect.js

module.exports = Command
 .of("connect")
 .alias("c")
 .argv("name")
  // could be used for :explain | :help
 .info(`connects to a session by character name, if it is reachable by ps aux or by port`)
 .task(async ({name})=> { 
   // do the work
 })

Also should research to see if there is some sort of library that handles this is a portable way, most seem to depend on process.argv that i've seen.

ondreian commented 4 years ago

yargs might be an appropriate choice.

edit: yargs is not an appropriate choice, it is tied internally to stdout