-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add oci-env edit-env command #73
base: main
Are you sure you want to change the base?
Conversation
client/oci_env/commands.py
Outdated
|
||
def edit_env(args): | ||
editor = os.getenv("OCI_ENV_EDITOR", "vim") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think "EDITOR" is a wildly used variable for this. Also xdg-open seems like a very good option. WDYT?
https://stackoverflow.com/questions/19252791/how-to-open-the-default-text-editor-in-linux
12bcab1
to
1288745
Compare
|
||
|
||
def edit_env(args): | ||
editor = os.getenv("EDITOR", "vim") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we default it to a "more" common editor, like vi
?
Not all distributions come with vim installed by default.
'Edit your current environment file in vim. To change the default editor, set the ' | ||
'EDITOR environment variable to the path for the binary of your choosing.' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'Edit your current environment file in vim. To change the default editor, set the ' | |
'EDITOR environment variable to the path for the binary of your choosing.' | |
'Open the current environment file using your default EDITOR (or vi/vim if none is found).' | |
'To change the default editor, set the EDITOR environment variable to the path for ' | |
'binary of your choosing.' |
Launches vim to edit the current compose.env file. Works with the
-e
flag. The editor can be configured via theOCI_ENV_EDITOR
env var, but will default to vim.