Skip to content

Commit

Permalink
show all aliases
Browse files Browse the repository at this point in the history
  • Loading branch information
kla committed Sep 13, 2024
1 parent c4d1d51 commit d5f5e51
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions src/cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import { StaxConfig } from '~/types'
import Stax from '~/stax'
import path from 'path'
import tmp from 'tmp'
import settings from './settings'

const DEFAULT_CONTEXT_NAME = 'stax'

Expand All @@ -16,10 +17,15 @@ const program = new Command()
program.name('stax')

program.command('alias')
.argument('<name>', 'Name of application')
.argument('<alias>', 'Name of alias for application')
.argument('[name]', 'Name of application')
.argument('[alias]', 'Name of alias for application')
.description('Create an alias for an application that can be used in place of the application\'s name when running commands')
.action((name, alias) => stax.find(name).addAlias(alias))
.action((name, alias) => {
if (name && alias)
return stax.find(name).addAlias(alias)

pp(settings.read("aliases"))
})

program.command('config')
.argument('<name>', 'Name of application')
Expand Down

0 comments on commit d5f5e51

Please sign in to comment.