Skip to content

Commit

Permalink
Merge pull request #45 from ClarkSource/#42
Browse files Browse the repository at this point in the history
[#42] replace own file edit command with clicks
  • Loading branch information
AFriemann authored Feb 7, 2020
2 parents 4e5b204 + 39af02a commit bd3d41a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,8 @@ $ k8t new template deployment -c MyCluster -e staging

### Config management

To ease file access a little bit k8t can open config and value files in your `$EDITOR` with a fallback to `vim`
To ease file access a little bit k8t can open config and value files in your `$EDITOR` or fallback to a sensible
default.

```bash
$ k8t edit values --environment staging
Expand Down
4 changes: 2 additions & 2 deletions k8t/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ def edit_config(directory, cname, ename): # pylint: disable=redefined-outer-nam
else:
file_path = os.path.join(directory, "config.yaml")

os.system("%s %s" % (os.getenv("EDITOR", "vim"), file_path))
click.edit(filename=file_path)


@edit.command(name="values", help="Edit value files in chosen context.")
Expand All @@ -286,7 +286,7 @@ def edit_values(directory, cname, ename): # pylint: disable=redefined-outer-nam

file_path = os.path.join(base_dir, "values.yaml")

os.system("%s %s" % (os.getenv("EDITOR", "vim"), file_path))
click.edit(filename=file_path)


def main():
Expand Down

0 comments on commit bd3d41a

Please sign in to comment.