mirror of
https://github.com/quine-global/hyper.git
synced 2026-01-13 04:28:41 -09:00
Fallback to nano if no editor is set (#517)
* Fallback to nano if no editor is set * Add notepad fallback for windows * Remove padding * Use constant instead of var
This commit is contained in:
parent
e4042d0628
commit
c95ca509f3
1 changed files with 2 additions and 1 deletions
|
|
@ -137,6 +137,7 @@ export function moveTo (i) {
|
|||
}
|
||||
|
||||
export function showPreferences () {
|
||||
const editorFallback = process.platform === 'win32' ? 'notepad' : 'nano';
|
||||
return (dispatch, getState) => {
|
||||
dispatch({
|
||||
type: UI_SHOW_PREFERENCES,
|
||||
|
|
@ -150,7 +151,7 @@ export function showPreferences () {
|
|||
// Leading space prevents command to be store in shell history
|
||||
[' echo Attempting to open ~/.hyperterm.js with your \$EDITOR', // eslint-disable-line no-useless-escape
|
||||
' echo If it fails, open it manually with your favorite editor!',
|
||||
' bash -c "exec env $EDITOR ~/.hyperterm.js"',
|
||||
' bash -c "exec env ${EDITOR:=' + editorFallback + '} ~/.hyperterm.js"',
|
||||
''
|
||||
].join('\n')
|
||||
));
|
||||
|
|
|
|||
Loading…
Reference in a new issue