Package Exports
- zsh.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (zsh.js) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
zsh.js
An almost functional zsh terminal in any div
Instalation
You can install via npm
$ npm install zsh.jsor via bower
$ bower install zsh.jsBasic Usage
Include the script and style
<link href="path/to/zsh.min.css" rel="stylesheet" />
<script src="path/to/zsh.js"></script>A global variable ZSH will be available, but require is also available - if you
want to add a custom command or rack around
var ZSH = require('zsh.js');
var FileSystem = require('zsh.js/lib/fs');
var CommandManager = require('zsh.js/lib/command-manager');And initialize it, passing an a div id to ZSH.create
ZSH.create('container');Web Component
You can also include zsh as a web component:
<link rel="import" href="path/to/zsh.js/zsh-terminal.html"/>
<zsh-terminal></zsh-terminal>An example is also available
Features
Right now you can use the follow shell functions:
To check the current implemented programs just run ls /usr/bin or check the contents of lib/fs/usr/bin
And the functionalities
- Autocomplete for commands
- Syntax Highlight
- Commands History
The other executable commands are just to show stuff about me... (since it was made for my personal website)
What I intend to implement next:
lessauto completion for pathsadd support to pipe commandsBetter command parsingadd the binds for tmux, some functionality is built but not accessible- copy and paste
C-c to clear linevimmkdir- add help for methods
Contributing
Updated
Executable files are now stored inside the actual file system folder and can be viewed within the terminal.
The path is not customizable yet, so all the commands are in src/lib/fs/usr/bin/*.js
Notice that: It is still possible to add commands through the CommandManager, but they are not automatically required, but could work if you are writing a plugin (example: tadeuzagallo.com/src/js/site-helpers.js)
Any .js file put inside src/js/lib/commands will automatically added on build, so feel free to add any
program and drop it there.
The most complex program so far is mv.js... Check it out to if you want to implement a custom command.
If you need help just get in touch!
Contact
You can:
- Follow @tadeuzagallo on Twitter
- Mail me at tadeuzagallo@gmail.com
- Open an issue
Any feedback or help is appreciated! :)
License
Terminal.js is available under MIT licence. See the LICENCE file for more info.