mirror of
https://github.com/quine-global/hyper.git
synced 2026-01-16 13:48:41 -09:00
Remove duplicated message and add a missing one
This commit is contained in:
parent
bf163bb668
commit
d34765faa6
1 changed files with 8 additions and 6 deletions
|
|
@ -201,11 +201,14 @@ export function moveTo(i) {
|
||||||
}
|
}
|
||||||
|
|
||||||
export function showPreferences() {
|
export function showPreferences() {
|
||||||
|
const isWin = process.platform === 'win32';
|
||||||
// eslint-disable-next-line no-template-curly-in-string
|
// eslint-disable-next-line no-template-curly-in-string
|
||||||
const command = process.platform === 'win32' ? ' start notepad "%userprofile%\\.hyper.js"' : ' bash -c \'exec env ${EDITOR:=nano} ~/.hyper.js\'';
|
const command = isWin ? ' start notepad "%userprofile%\\.hyper.js"' : ' bash -c \'exec env ${EDITOR:=nano} ~/.hyper.js\'';
|
||||||
const message = process.platform === 'win32' ?
|
const message = [];
|
||||||
|
message.push(isWin ?
|
||||||
' echo Attempting to open ^%userprofile^%\\.hyper.js with notepad' :
|
' echo Attempting to open ^%userprofile^%\\.hyper.js with notepad' :
|
||||||
' echo Attempting to open ~/.hyper.js with your \\$EDITOR';
|
' echo Attempting to open ~/.hyper.js with your \\$EDITOR');
|
||||||
|
message.push(' echo If it fails, open it manually with your favorite editor!');
|
||||||
|
|
||||||
return dispatch => {
|
return dispatch => {
|
||||||
dispatch({
|
dispatch({
|
||||||
|
|
@ -217,9 +220,8 @@ export function showPreferences() {
|
||||||
rpc.once('session data', () => {
|
rpc.once('session data', () => {
|
||||||
dispatch(sendSessionData(
|
dispatch(sendSessionData(
|
||||||
uid,
|
uid,
|
||||||
[ // Leading space prevents command to be stored in shell history
|
[
|
||||||
' echo Attempting to open ~/.hyper.js with your \$EDITOR', // eslint-disable-line no-useless-escape
|
...message,
|
||||||
message,
|
|
||||||
command,
|
command,
|
||||||
''
|
''
|
||||||
].join('\n\r')
|
].join('\n\r')
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue