From 85f479995ddad8fff120f96c37aacdf6a455a84a Mon Sep 17 00:00:00 2001 From: Nightmarlin Date: Thu, 9 May 2019 16:42:04 +0100 Subject: [PATCH 1/4] extended config options to allow for custom separator The main reason the plugin won't work in some environments is due to how command chaining works in those environments. This should make it easier to fix for your environment. TODO: Add automatic detection --- index.js | 6 ++++-- src/join-commands.js | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/index.js b/index.js index 2358c44..467bf4f 100644 --- a/index.js +++ b/index.js @@ -8,9 +8,11 @@ const waitFor = require('./src/wait-for') const init = {} const terminal = {} let clearCommand +let commandSeparator exports.onApp = ({ config }) => { clearCommand = config.getConfig().clearCommand || undefined + commandSeparator = config.getConfig().commandSeparator || undefined Object.assign(init, config.getConfig().init) } @@ -24,7 +26,7 @@ exports.reduceTermGroups = reducer => exports.middleware = store => next => action => { if (action.type === 'SESSION_ADD') Object.assign(terminal, { splitDirection: action.splitDirection }) - + next(action) } @@ -32,7 +34,7 @@ exports.onWindow = app => app.rpc.on('hyper-init execute commands', ({ uid, terminal }) => { clearBuffer({ app, uid }, clearCommand) Object.keys(init).map(key => { - let cmd = joinCommands(init[key].commands) + let cmd = joinCommands(init[key].commands, commandSeparator) rulesHandler({ init, key, cmd, app, uid, terminal }) }) }) diff --git a/src/join-commands.js b/src/join-commands.js index 2639244..aca37ed 100644 --- a/src/join-commands.js +++ b/src/join-commands.js @@ -1 +1 @@ -exports.joinCommands = commands => commands.join(' && ') \ No newline at end of file +exports.joinCommands = (commands, commandSeparator = ' && ') => commands.join(commandSeparator) \ No newline at end of file From 38fe3dc08ae5146626e0816534593ac8997fc7ba Mon Sep 17 00:00:00 2001 From: Nightmarlin Date: Thu, 9 May 2019 17:03:33 +0100 Subject: [PATCH 2/4] Update README.md README now demonstrates command separator. Also grammar fixes and title restructuring --- README.md | 75 ++++++++++++++++++++++++++++++++----------------------- 1 file changed, 44 insertions(+), 31 deletions(-) diff --git a/README.md b/README.md index 99e0153..06abcb0 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@

The ultimate and most complete extension to initialize commands before and after Hyper terminal starts

-become a patron or sponsor +become a patron or sponsor Donate npm version downloads @@ -14,24 +14,26 @@

-> With **hyper-init** you can perform as many commands as you would like to do, before and after Hyper terminal starts, using rules that defines when your commands should run. +> With **hyper-init** you can perform as many commands as you would like to do, before and after Hyper terminal starts, using rules that define when your commands should run.

hyper-init gif

## Table of Contents +- [Table of Contents](#table-of-contents) - [Installation](#installation) - [Configuration](#configuration) - [init](#init) + - [Rules](#rules) + - [Commands](#commands) - [clearCommand](#clearcommand) -- [init Options](#init-options) - - [Rules](#rules) - - [Commands](#commands) + - [commandSeparator](#commandseparator) +- [License](#license) ## Installation -If you don't have Hyper, install it from [here](https://hyper.is/#installation). +If you don't have Hyper, install it [here](https://hyper.is/#installation). So, type the following on Hyper: @@ -41,11 +43,11 @@ hyper i hyper-init ## Configuration -## init +### init -```hyper-init``` can be configured in ```~/.hyper.js``` configuration file within the ```config``` object. +`hyper-init` can be configured within the `config` object in the `~/.hyper.js` configuration file. -All you have to do to get started is to create an array of objects called ```init```. +All you have to do to get started is to create an array of objects called `init`, like this: ```js init: [ @@ -56,11 +58,11 @@ init: [ ] ``` -Your ```~/.hyper.js``` configuration file should look like this: +Your `~/.hyper.js` configuration file should look like this: ```js module.exports = { config: { - + // add hyper-init configuration like this: init: [ { @@ -71,7 +73,7 @@ module.exports = { rule: 'windows', commands: ['echo This is only executed on New Windows!'] } - ] + ] }, plugins: ['hyper-init'] @@ -79,9 +81,30 @@ module.exports = { } ``` -## clearCommand +#### Rules +A string that defines when you want your commands to run. + + Rule | Description + --- | --- + `once` | executes your commands only at Hyper starts + `windows` | executes your commands only when a new Hyper window opens + `tabs` | executes your commands only when a new tab is opened + `splitted` | executes your commands only when a new pane is opened + `all` | executes your commands every time a terminal opens + +#### Commands +An array with your shell commands to run.
+You can perform as many commands as you would like. + +Example: +```js +commands: ['cd ~/Desktop', 'ls'] +``` + -Also `hyper-init` clears the terminal buffer using `printf "\\033[H"` as the default value, but you can set it manually adding the `clearCommand: ''` property within the `config` object. For example: +### clearCommand + +`hyper-init` clears the terminal buffer using `printf "\\033[H"` as the default value, but you can set it manually adding the `clearCommand: ''` property within the `config` object. For example: ```js module.exports = { @@ -91,26 +114,16 @@ module.exports = { } ``` -## init: Options - -### Rules -A string that defines when you want your commands to run. - - Rule | Description - --- | --- - `once` | executes your commands only at Hyper starts - `windows` | executes your commands only at new windows - `tabs` | executes your commands only at new tabs - `splitted` | executes your commands only at splitted windows - `all` | executes your commands with all described states previously +### commandSeparator -### Commands -An array with your shell commands to run.
-You can perform as many commands as you would like to do. +`hyper-init` uses ` && ` as the default separator for commands. Not all terminals support this syntax, but you can set it manually by adding the `commandSeparator: ''` property within the `config` object. For example: -Example: ```js -commands: ['cd ~/Desktop', 'ls'] +module.exports = { + config: { + commandSeparator: '; ' // For PowerShell users + } +} ``` ## License From 41a2eb388c6682d85f9d6f8a14f14575f2fc0c4a Mon Sep 17 00:00:00 2001 From: Nightmarlin Date: Thu, 9 May 2019 23:10:39 +0100 Subject: [PATCH 3/4] Definitely detect default delimiter Default delimiter is now detected. Currently only has PS and CMD customs, but they WORK! Printf error is on the way out Updated README.md accordingly --- README.md | 14 ++++++++++++-- img/hyper_test_cmd.png | Bin 0 -> 8302 bytes img/hyper_test_node.png | Bin 0 -> 14495 bytes img/hyper_test_powershell.png | Bin 0 -> 10790 bytes index.js | 14 +++++++++----- src/get-specifics.js | 15 +++++++++++++++ 6 files changed, 36 insertions(+), 7 deletions(-) create mode 100644 img/hyper_test_cmd.png create mode 100644 img/hyper_test_node.png create mode 100644 img/hyper_test_powershell.png create mode 100644 src/get-specifics.js diff --git a/README.md b/README.md index 06abcb0..65f8632 100644 --- a/README.md +++ b/README.md @@ -116,15 +116,25 @@ module.exports = { ### commandSeparator -`hyper-init` uses ` && ` as the default separator for commands. Not all terminals support this syntax, but you can set it manually by adding the `commandSeparator: ''` property within the `config` object. For example: +`hyper-init` uses ` && ` as the default separator for commands. +For known terminals, `hyper-init` can infer the separator. +You can also set it manually by adding the `commandSeparator: ''` property within the `config` object, +but this overrides for all terminals, even ones that don't support that delimiter. +For example: ```js module.exports = { config: { - commandSeparator: '; ' // For PowerShell users + commandSeparator: ' ++ ' // For an arbitrary terminal that uses `++` } } ``` +![Testing in PowerShell](/img/hyper_test_powershell.png) +![Testing in CMD](img/hyper_test_cmd.png) +![Testing in Node](img/hyper_test_node.png) + +No, I haven't fixed the `printf \033[H` error yet. I will. Soon + ## License [MIT License](https://github.com/daltonmenezes/hyper-init/blob/master/LICENSE) diff --git a/img/hyper_test_cmd.png b/img/hyper_test_cmd.png new file mode 100644 index 0000000000000000000000000000000000000000..e5d680ba1ec226270c21975537edf6368511d27f GIT binary patch literal 8302 zcmeHsc~p{JyFQJtX_IAAnNl`rrIJ}%PBds%PL-LO3YIygI3y}+KyRt#NYg7hpyl{F zBB@x4U?x&IkeZ?(`l30YA}T5>A_x0^-?z?M=d9m3-#O>6v(6tp>}NlF?cv`0zOH-U zSL`(#i!Jhdvwr6sezoP0(R1tln+_Qr*`!CL4_fV?U+*OsvwfT8+V}&F z+uaWgJ5y1ww^39>c7b=RGS)}gmN%hB!b?{sV z!Oi}`+!=OzK1A4q_=)X%Lz(F$Ph({UR8-9nai_Y?Ie6; zJH^2?gEGet$RDEyU`C91+5sxoDl0?O6b_}TAGGk-({{|_B4?;Nj5^i#WAQtr)nD8= zvZ96JkHc)K^UhRfQz?PEKy4o}l}69@el)whVpw0gYWaeRlKb}YyD)cx%pLAD^O`p}mqoU% z>6S2Qqe0W7U4pqKh^dqEA|t~PUz$M4)|woD=W{KBelNF>G1?V*q)8V!z+?WwJ;{>x zaKzuH_6&;ZsGuwKenejHh+Kx^gy}TTNci~Y2{~}x+n?K^7wkYAJHgxyj<~Ehm}yIx zjdT!)L521RR#wKF06Sk$>Y4*yF+RgkgPwY zqqBU3_*G^q-*-ZUXP`?r8w7yFX%9#R6j(NMg)|}hq>-u9U!F?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zWo?VC>lJ$9AKln?RCb>0Schay^B(>BU{bH(yXw$ovLTC|evPM2F7sU7Jm2`K`c&n2 z=7BQKR{1Y0YX7`F{~5jR|9bzoN~RkPJupPL493uG^M6~J8=mP$_Em7Mu6kcxoc*WV z9gH-R^QKiObRnHRyjyN&cTQBy#aMIszIPJ7Uc)iCX2k z;%-~=@~-kVM^+O5QTLxvw*RN*^RIOCjcS*rApU)8VmVgft1L1ATrsyXE4|?M_+J2+ CzH&kU literal 0 HcmV?d00001 diff --git a/img/hyper_test_node.png b/img/hyper_test_node.png new file mode 100644 index 0000000000000000000000000000000000000000..a515158e9e22fa582194901e6a9e7ae7f960bcde GIT binary patch literal 14495 zcmeIZ2T)Uc*Eh=1BOFD*M^uDR^dP9TC?!Z&QB_L)zo1Hmw5sx-SG~IE=aN>RVU=S6i|LD>;H}xLdKYMuh z*4=Z}=Z?w<7frRlmWa0Fy(Rtkj^gjh*Y93(+*setk!WyvL=5z2JtYrFHfpVkVAki= zX4HtAWki?U)d`8lH9YhXM?$VUV$^*}!-W3eERBl`dma88=kVi53-A6Z@C0Q401sc< z|L_;ymqPoekaO7m!_uMu zn^i~b++`rl^)PV~8zVL2jTaFs^Tf&GrbPgKY%e=uKALp5IUrzqd-8+Cwk}NqE84V+ zK(GR+YkO3Q-5c7=ohEp;#B*~Nn7mZ!2WIBR*RXx10{0%-l!oqJ+J22#O1S1HE2pqG+xOmki22E4ccL*{B7s|X5Ta3LlqDQT<+IWfEivV(@64wD#ByEp z7C9WgduXprXGe0gCwHT>o_IL~vl1*(2z9Fwgd|g~DLMe|^L)3uqAoHD+sd6AXL$MS zhBKLV&D6{yhHJ?4In1sVN8sF&VzTCqx2a3-Lz{L8JOlO@Cod~;RpL=g?|Y|a9n(2> zVVqTReaX6cHJA!z?>!1-tG1Ab2X{$2+p9}^lNIV74!9aHyoaT|D})fvc`@JyU&(nU zM<3j%dD(bNhpD7N#jdRtT$Er(ELF;8N3H*SzU8?qt=T#+n7fr?7{XvhPq=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-*>B9V>< literal 0 HcmV?d00001 diff --git a/img/hyper_test_powershell.png b/img/hyper_test_powershell.png new file mode 100644 index 0000000000000000000000000000000000000000..9674cfbcaef915f5ea5c1621e0f39a559fb7205d GIT binary patch literal 10790 zcmeHtc{JPW*KayFb!e*&6|Jh%IxQVY)mVa4rP@QOs-Z=+Qbh?hCx~=XGso#*mX?y5 zk12`}HC72FMI}fHi8O*ph$Ip>e($^9`@8GjyViZ*d*8M0TKE2ueAn~MlV{p{fA(iT zdnaDEv)(6jSOx$9?7Mo!@&*8~3j_e{xF!9Qy!({CpjMRlN3R$&;%M!>a42B;v5b&xy}8 zuU1_Bn6h9Qta!-tmyDfB&Kbau)~-wR&B002P#SI0#4y|BY6Pe6Hu_cc5P8anVycT@ zHU;slGB>Nw`~m>9$JxPm002q9;v@^TIsgFx9vzpKZ0~pZXFvepjdX`B0C0WxjAR>{ zPgZsU0E!p?huyC~;+f-+zrvUWvQKgA7Uae^D9VOO4 z3i0AIsuu)(Vcl}+gSYO}t0-5uHYS0@eL;M7wx65XCS33tZ-#c>8kkz+s73RJ-l33U z$_Prh&TI1sR!WS4Ah=vr)dfN88Ogos1QClL) zDX~>cA#!*S7vPH(x={oXf=|8sOKeapqYZcyz8phg=t%CZh^>$I??77|mmjcRPRlgM zhQUV(dEEBu*k7kMspUi;@oF8Tg(3=Utwc$d_Kqk1TwTnA#eRt0Ttc@*-ZyzWzDn>O z#B3nHEoN#&qTUr86@@IwrH?KL4QyTKuqqHRSuw zwQ@JLt6S`b>T#(*cE9$F@eTDDh~ZN4<~~i*Cx?)X{_w{yF;;AayWYe-=I-X{=1UIB z))`7ep8Cya^98-2uU0{B@IT>|rFfyR8IWvYQi6o{z6d|2BwVAT_%7iWg=1vY=~miv zw;wyrX`)4>$_NE5*z}XST|H01MzQkdf0CDS(minYX8keJFQUVuT9#qNm}rBDUzz5v zK<&S#7s+`|v&}DLw5@c5M&GJW7vVRVrOnl=*q>OPdr+)hYY}GaiR!w{{j=_hPYJ<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)d-0{v8>>=xuCy6C7gv;X&&-nF?ML**I zJ3!~CBIG49lulNHTt+AO8`+uv6&x|+t*7PLV&?H0Eq4N!$16l!~vF$VbzUlgM z|WygL0ytW1%)?qb!W))*VrRhv18LSc@xK)cdt~y0= zUC&wbn=jkZmcQHxkwywQ9!Ov@}bCfz<9};l-T8f&DT$RU#hj%{A36PA1jkecC8v7cZ`ftv7FC(?A zp=EbMeYbjunD~sAA3-^2W%Dd&y1E5&yTIaM?Acg&X~)MBAN#?d4`xoWZ;}x2WON*N z9bJ3h(c6`QA<_5U`&Y7!MG#+4h8n5n=h?ai!qDiS|K$T6bRT$m+uVj*4 zI_B6+Q=a?O57tKdf>l*pTEZdjnRT-neR{#OuD8cEzW<}3Lvk>oBv-YkS|;uKAWpN1 zX~dlCZDK>JP0$nsCcJ0d>=S)h^^S160whn3ZXgkU239X96?`M^FNIx45T#!uRmgQU zHA^0T-DN%9{9uAj-t!2Ol(0?$UlUEtTj1r%s0(%nTcBb$ZJ&P|C8feXcfXy}{rz8N+5Y}ts9E{XxX1br7ts9w#r)4oi~j$~ z{NH#oN{i7Tys<~@S~w$V3yBn=z(H<-$F@!J&c~34eX|I1i0n3=17yecYTx>|#>xM^ zGPD0@bfNuv>w*>NLH>Tg-`6{2&)t-V>{gb9O46YA>sAl>0z>?}d_H3;kHnz)SSTn%ypnpvMN6zD7{s$NW@aW?9*z@gwbtY|3 zn!G*f?w9wkNPPdJyYiA@9>{9$+zU9jw?p>t1&K1;QGN#eo_F95;8C1pl28i?dMo__ z-!Ygit@T6}@DTe?@x(vZ7|yJgSLZ6Y|C17}w`O{pD%_dff=^>7E&c-qivOoH=X(-& aYljIh-{ZFKHM&H-0avZ;EUPT;Jozu!{k3NR literal 0 HcmV?d00001 diff --git a/index.js b/index.js index 467bf4f..ab30177 100644 --- a/index.js +++ b/index.js @@ -3,6 +3,8 @@ const { rulesHandler } = require('./src/rules/rules-handler') const { clearBuffer } = require('./src/clear-buffer') const { joinCommands } = require('./src/join-commands') +const { getSeparator } = require('./src/get-specifics') +const { getClearScreen } = require('./src/get-specifics') const waitFor = require('./src/wait-for') const init = {} @@ -30,14 +32,16 @@ exports.middleware = store => next => action => { next(action) } -exports.onWindow = app => - app.rpc.on('hyper-init execute commands', ({ uid, terminal }) => { - clearBuffer({ app, uid }, clearCommand) +exports.onWindow = browserWindow => { + browserWindow.rpc.on('hyper-init execute commands', ({ uid, terminal }) => { + if (commandSeparator === undefined) { commandSeparator = getSeparator(browserWindow, uid) } + clearBuffer({ app: browserWindow, uid }, clearCommand) Object.keys(init).map(key => { let cmd = joinCommands(init[key].commands, commandSeparator) - rulesHandler({ init, key, cmd, app, uid, terminal }) + rulesHandler({ init, key, cmd, app: browserWindow, uid, terminal }) }) - }) + }) +} exports.onRendererWindow = app => waitFor(app, 'rpc', rpc => diff --git a/src/get-specifics.js b/src/get-specifics.js new file mode 100644 index 0000000..e858a99 --- /dev/null +++ b/src/get-specifics.js @@ -0,0 +1,15 @@ +const Path = require('path') + +const KNOWN_SEPARATORS = { + powershell: '; ', + node: '; ', + cmd: ' & ', + fallback: ' && ', +} + +exports.getSeparator = (browserWindow, uid) => { + let shellName = Path.parse(browserWindow.sessions.get(uid).shell).name.toLowerCase() + return KNOWN_SEPARATORS[shellName] || KNOWN_SEPARATORS['fallback'] // Separator not found +} + +exports.getClearScreen = ( ) => { } \ No newline at end of file From 9983094c71a760512484eb1fb58f4a17b71de477 Mon Sep 17 00:00:00 2001 From: Nightmarlin Date: Thu, 9 May 2019 23:42:33 +0100 Subject: [PATCH 4/4] Refactor into one object, add clearCommand, update README.md added the clearCommand configs. README updated accordingly Added #Contribute section to make it easier for user to add unlisted terminal types --- README.md | 51 ++++++++++++++++++++++++++++++++++---------- index.js | 4 +++- src/get-specifics.js | 17 +++++++++------ 3 files changed, 53 insertions(+), 19 deletions(-) diff --git a/README.md b/README.md index 65f8632..33f01fe 100644 --- a/README.md +++ b/README.md @@ -28,6 +28,7 @@ - [Commands](#commands) - [clearCommand](#clearcommand) - [commandSeparator](#commandseparator) +- [Contributing](#contributing) - [License](#license) @@ -104,13 +105,16 @@ commands: ['cd ~/Desktop', 'ls'] ### clearCommand -`hyper-init` clears the terminal buffer using `printf "\\033[H"` as the default value, but you can set it manually adding the `clearCommand: ''` property within the `config` object. For example: +`hyper-init` can infer the command to clear the screen for a small number of terminals. +If it can't infer the command, `hyper-init` clears the terminal buffer using `printf "\\033[H"`. +You can set it manually adding the `clearCommand: ''` property within the `config` object. +For example: ```js module.exports = { - config: { - clearCommand: 'reset' - } + config: { + clearCommand: 'reset' + } } ``` @@ -124,17 +128,42 @@ For example: ```js module.exports = { - config: { - commandSeparator: ' ++ ' // For an arbitrary terminal that uses `++` - } + config: { + commandSeparator: ' ++ ' // For an arbitrary terminal that uses `++` + } +} +``` + +## Contributing + +`hyper-init`'s ability to infer the `clearCommand` and `commandSeparator` is based on its relatively small dictionary. +Feel free to add more definitions for terminals not listed in `get-specifics.js`. + +```js +KNOWN_SHELLS = { + [...] + shellName: { + separator: '', + clearCommand: '' + } + [...] } ``` -![Testing in PowerShell](/img/hyper_test_powershell.png) -![Testing in CMD](img/hyper_test_cmd.png) -![Testing in Node](img/hyper_test_node.png) +- `shellName` should be replaced with the name of the shell you want to target (lowercase) +- The value of `separator` should be the separator for multiple statements on one line (IE `' && '`) as a string +- The value of `clearCommand` should be the command to clear the target shell (IE `'cls'`) as a string -No, I haven't fixed the `printf \033[H` error yet. I will. Soon +```js +KNOWN_SHELLS = { + [...] + powershell: { + separator: '; ', + clearCommand: 'Clear-Host' + } + [...] +} +``` ## License [MIT License](https://github.com/daltonmenezes/hyper-init/blob/master/LICENSE) diff --git a/index.js b/index.js index ab30177..cd2e6be 100644 --- a/index.js +++ b/index.js @@ -4,7 +4,7 @@ const { rulesHandler } = require('./src/rules/rules-handler') const { clearBuffer } = require('./src/clear-buffer') const { joinCommands } = require('./src/join-commands') const { getSeparator } = require('./src/get-specifics') -const { getClearScreen } = require('./src/get-specifics') +const { getClearCommand } = require('./src/get-specifics') const waitFor = require('./src/wait-for') const init = {} @@ -35,6 +35,8 @@ exports.middleware = store => next => action => { exports.onWindow = browserWindow => { browserWindow.rpc.on('hyper-init execute commands', ({ uid, terminal }) => { if (commandSeparator === undefined) { commandSeparator = getSeparator(browserWindow, uid) } + if (clearCommand === undefined) { clearCommand = getClearCommand(browserWindow, uid) } + clearBuffer({ app: browserWindow, uid }, clearCommand) Object.keys(init).map(key => { let cmd = joinCommands(init[key].commands, commandSeparator) diff --git a/src/get-specifics.js b/src/get-specifics.js index e858a99..ced268d 100644 --- a/src/get-specifics.js +++ b/src/get-specifics.js @@ -1,15 +1,18 @@ const Path = require('path') -const KNOWN_SEPARATORS = { - powershell: '; ', - node: '; ', - cmd: ' & ', - fallback: ' && ', +const KNOWN_SHELLS = { + powershell: { separator: '; ', clearCommand: 'Clear-Host' }, + node: { separator: '; ', clearCommand: 'console.clear();' }, + cmd: { separator: ' & ', clearCommand: 'cls' }, + fallback: { separator: ' && ', clearCommand: 'printf "\\033[H"' }, } exports.getSeparator = (browserWindow, uid) => { let shellName = Path.parse(browserWindow.sessions.get(uid).shell).name.toLowerCase() - return KNOWN_SEPARATORS[shellName] || KNOWN_SEPARATORS['fallback'] // Separator not found + return KNOWN_SHELLS[shellName].separator || KNOWN_SHELLS['fallback'].separator // Separator not found } -exports.getClearScreen = ( ) => { } \ No newline at end of file +exports.getClearCommand = (browserWindow, uid) => { + let shellName = Path.parse(browserWindow.sessions.get(uid).shell).name.toLowerCase() + return KNOWN_SHELLS[shellName].clearCommand || KNOWN_SHELLS['fallback'].clearCommand // Command not found +} \ No newline at end of file