Commit 0e54f225 authored by Theophile GENTILHOMME's avatar Theophile GENTILHOMME

[databases] Add path and edit commands

parent 1f6bbfb4
......@@ -596,6 +596,33 @@ def list(ctx, remote):
return common.display_local_list(configuration.path, 'database')
@databases.command()
@click.argument('names', nargs=-1)
@click.pass_context
def path(ctx, names):
'''Displays local path of databases files
Example:
$ beat databases path xxx
'''
return common.display_local_path(ctx.meta['config'].path, 'database', names)
@databases.command()
@click.argument('name', nargs=1)
@click.pass_context
def edit(ctx, name):
'''Edit local database file
Example:
$ beat databases edit xxx
'''
return common.edit_local_file(ctx.meta['config'].path,
ctx.meta['config'].editor, 'database',
name)
@databases.command()
@click.argument('db_names', nargs=-1)
@click.pass_context
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment