@seflless/ghosttown 1.3.2 → 1.3.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/assets/ghosts.png +0 -0
- package/package.json +1 -1
- package/src/cli.js +12 -22
package/bin/assets/ghosts.png
CHANGED
|
Binary file
|
package/package.json
CHANGED
package/src/cli.js
CHANGED
|
@@ -55,22 +55,18 @@ function checkTmuxInstalled() {
|
|
|
55
55
|
* Print tmux installation instructions and exit
|
|
56
56
|
*/
|
|
57
57
|
function printTmuxInstallHelp() {
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
console.error(' \x1b[36mmacOS (Homebrew):\x1b[0m brew install tmux');
|
|
64
|
-
console.error(' \x1b[36mmacOS (MacPorts):\x1b[0m sudo port install tmux');
|
|
65
|
-
} else if (process.platform === 'linux') {
|
|
66
|
-
console.error(' \x1b[36mDebian/Ubuntu:\x1b[0m sudo apt install tmux');
|
|
67
|
-
console.error(' \x1b[36mFedora:\x1b[0m sudo dnf install tmux');
|
|
68
|
-
console.error(' \x1b[36mArch:\x1b[0m sudo pacman -S tmux');
|
|
69
|
-
} else {
|
|
70
|
-
console.error(' Please install tmux using your system package manager.');
|
|
71
|
-
}
|
|
58
|
+
const RESET = '\x1b[0m';
|
|
59
|
+
const RED = '\x1b[31m';
|
|
60
|
+
const CYAN = '\x1b[36m';
|
|
61
|
+
const BEIGE = '\x1b[38;2;255;220;150m';
|
|
62
|
+
const DIM = '\x1b[2m';
|
|
72
63
|
|
|
73
|
-
console.
|
|
64
|
+
console.log('');
|
|
65
|
+
console.log(` ${RED}ghosttown needs tmux to be installed.${RESET}`);
|
|
66
|
+
console.log(` ${DIM}tmux is used to manage terminal sessions.${RESET}`);
|
|
67
|
+
console.log('');
|
|
68
|
+
console.log(` ${CYAN}To install:${RESET} ${BEIGE}brew install tmux${RESET}`);
|
|
69
|
+
console.log('');
|
|
74
70
|
process.exit(1);
|
|
75
71
|
}
|
|
76
72
|
|
|
@@ -329,13 +325,7 @@ function detachFromTmux() {
|
|
|
329
325
|
if (clientTty) {
|
|
330
326
|
result = spawnSync(
|
|
331
327
|
'tmux',
|
|
332
|
-
[
|
|
333
|
-
'detach-client',
|
|
334
|
-
'-t',
|
|
335
|
-
clientTty,
|
|
336
|
-
'-E',
|
|
337
|
-
`printf %s '${messageForShell}'`,
|
|
338
|
-
],
|
|
328
|
+
['detach-client', '-t', clientTty, '-E', `printf %s '${messageForShell}'`],
|
|
339
329
|
{
|
|
340
330
|
stdio: 'inherit',
|
|
341
331
|
}
|