semaphoreci / cli

Semaphore 2.0 Command Line Interface
Apache License 2.0
25 stars 13 forks source link

Editor env var; Editor arguments #135

Closed shiroyasha closed 5 years ago

shiroyasha commented 5 years ago

Two changes in this PR:

  1. The order of editor lookup: (1) try from config, (2) try from EDITOR env var, (3) use vim
  2. Editor can now have additional flags, example: subt --something.

Supporting flags in editor command wasn't straghtforward, but I found a solution in https://github.com/kubernetes/kubernetes/blob/master/pkg/kubectl/cmd/util/editor/editor.go#L70.

fixes https://github.com/semaphoreci/cli/issues/130 fixes https://github.com/semaphoreci/cli/issues/132