Skip to content

Commit

Permalink
Add some colors
Browse files Browse the repository at this point in the history
Update readme with icon
  • Loading branch information
JLChnToZ committed May 6, 2017
1 parent ed5daa8 commit f23fd15
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
Uniterm
<img src="icons/uniterm.png" width="24" height="24" alt="icon" /> Uniterm
=======

An experimental cross-platform terminal emulator based on [hterm](https://chromium.googlesource.com/apps/libapps/+/master/hterm), [node-pty](https://github.com/Tyriar/node-pty) and [Electron](https://electron.atom.io). Most of the code here are adopted from my another experimental project [Replio Standalone](https://github.com/JLChnToZ/replio/tree/standalone).

Install
Expand All @@ -18,7 +19,7 @@ $ npm run package
```

```
Usage: uniterm [options] <cmd> [args...]
Usage: uniterm [options] [--] <cmd> [args...]
Options:
Expand Down
8 changes: 4 additions & 4 deletions lib/shells/minsh.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const shellCommands = {
let message = 'There are no too many built-in commands in this shell, except for:\n';
for(let cmdname in shellCommands) {
const cmd = shellCommands[cmdname];
message += ` \`\x1b[36;1m${cmdname}\x1b[0;36;3m${cmd.args ? (' ' + cmd.args) : ''}\x1b[0m\`: ${cmd.description}\n`;
message += ` \`\x1b[36;1m${cmdname}${cmd.args ? (' \x1b[0;36;3m' + cmd.args) : ''}\x1b[0m\`: ${cmd.description}\n`;
}
message += 'All other commands will be parsed as external command with ' +
'arguments and run directly in current tab.\n' +
Expand Down Expand Up @@ -50,7 +50,7 @@ const shellCommands = {
throw new Error(errno.code.ENOTDIR.description);
this.cwd = newPath;
}
this.console.log('Current working directory is:', this.cwd);
this.console.log(`Current working directory is: \x1b[36m${this.cwd}\x1b[0m`);
}
},
'set': {
Expand All @@ -75,15 +75,15 @@ const shellCommands = {
action() {
let message = 'Registered environment variables:\n';
for(let key in this.env)
message += ` ${key} = ${this.env[key]}\n`;
message += ` \x1b[33;1m${key}\x1b[0m = \x1b[33m${this.env[key]}\x1b[0m\n`;
this.console.log(message);
}
},
'start': {
args: 'command [args...]',
description: 'Run an external command in new tab',
action(line) {
this.console.log(`Launch "${line[0]}" in new tab...`);
this.console.log(`Launch \`\x1b[36;1m${line[0] || 'minsh'}\x1b[0m\` in new tab...`);
new TerminalHost(line.length ? new ExecShell(line, this.cwd, this.env) : new MinShell(this.cwd, this.env));
}
},
Expand Down

0 comments on commit f23fd15

Please sign in to comment.