Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit ca5fa58

Browse filesBrowse files
committed
working on moar docs
1 parent 496ff44 commit ca5fa58
Copy full SHA for ca5fa58

File tree

Expand file treeCollapse file tree

2 files changed

+144
-0
lines changed
Filter options
Expand file treeCollapse file tree

2 files changed

+144
-0
lines changed

‎readline.html

Copy file name to clipboard
+74Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
<!doctype html>
2+
<html>
3+
<head>
4+
<meta charset="utf-8">
5+
<meta http-equiv="X-UA-Compatible" content="chrome=1">
6+
<title>Josh.js by sdether</title>
7+
<link rel="stylesheet" href="stylesheets/styles.css">
8+
<link rel="stylesheet" href="stylesheets/pygment_trac.css">
9+
<script src="javascripts/respond.js"></script>
10+
<!--[if lt IE 9]>
11+
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
12+
<![endif]-->
13+
<!--[if lt IE 8]>
14+
<link rel="stylesheet" href="stylesheets/ie.css">
15+
<![endif]-->
16+
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
17+
<link href='http://fonts.googleapis.com/css?family=Source+Code+Pro' rel='stylesheet' type='text/css'>
18+
<link rel="stylesheet" href="http://code.jquery.com/ui/1.9.2/themes/base/jquery-ui.css">
19+
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min.js"></script>
20+
<script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.9.2/jquery-ui.min.js"></script>
21+
<script src="http://cdnjs.cloudflare.com/ajax/libs/underscore.js/1.4.2/underscore-min.js"></script>
22+
</head>
23+
<body>
24+
<div id="header">
25+
<nav>
26+
<li><a href="index.html">Back to the Documentation</a></li>
27+
</nav>
28+
</div>
29+
<div class="wrapper">
30+
31+
<section>
32+
<h1>Josh.Readline</h1>
33+
34+
<p><code>Josh.Readline</code> is the underlying plumbing responsible for all keystroke handling, bringing
35+
<a href="http://cnswww.cns.cwru.edu/php/chet/readline/readline.html">GNU Readline</a> like line editing to the browser. It is used by
36+
<code>Josh.Shell</code> to implement
37+
<em>bash</em>-like command prompt behavior, but could easily be wired up to any text box requiring advanced key handling. It has no dependencies on any outside libraries, although it does require either
38+
<code>Josh.History</code> and <code>Josh.Killring</code> or objects implementing the same calls.</p>
39+
40+
<h2>Functions</h2>
41+
<p>When using <code>Josh.Shell</code> Readline is proxied for those calls that need to be exposed and otherwise invisible. The full API for readline is really only of interest for usage away from <code>Josh.Shell</code>.</p>
42+
43+
<h3>new Josh.Readline(config)</h3>
44+
<h3>isActive()</h3>
45+
<h3>activate()</h3>
46+
<h3>deactivate()</h3>
47+
<h3>getLine</h3>
48+
<h3>onActivate(eventHandler)</h3>
49+
<h3>onDeactivate</h3>
50+
<h3>onChange</h3>
51+
<h3>onClear</h3>
52+
<h3>onEnter</h3>
53+
<h3>onCompletion</h3>
54+
<h3>onCancel</h3>
55+
<h3>onEOT</h3>
56+
<h3>onSearchStart</h3>
57+
<h3>onSearchEnd</h3>
58+
<h3>onSearchChange</h3>
59+
<h3></h3>
60+
<h3></h3>
61+
62+
<h2>Internal Dependencies</h2>
63+
<h3>Josh.History</h3>
64+
<h3>Josh.Killring</h3>
65+
66+
<h2>External Dependencies</h2>
67+
<p><em>None</em></p>
68+
</section>
69+
</div>
70+
<!--[if !IE]>
71+
<script>fixScale(document);</script><![endif]-->
72+
73+
</body>
74+
</html>

‎shell.html

Copy file name to clipboard
+70Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
<!doctype html>
2+
<html>
3+
<head>
4+
<meta charset="utf-8">
5+
<meta http-equiv="X-UA-Compatible" content="chrome=1">
6+
<title>Josh.js by sdether</title>
7+
<link rel="stylesheet" href="stylesheets/styles.css">
8+
<link rel="stylesheet" href="stylesheets/pygment_trac.css">
9+
<script src="javascripts/respond.js"></script>
10+
<!--[if lt IE 9]>
11+
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
12+
<![endif]-->
13+
<!--[if lt IE 8]>
14+
<link rel="stylesheet" href="stylesheets/ie.css">
15+
<![endif]-->
16+
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
17+
<link href='http://fonts.googleapis.com/css?family=Source+Code+Pro' rel='stylesheet' type='text/css'>
18+
<link rel="stylesheet" href="http://code.jquery.com/ui/1.9.2/themes/base/jquery-ui.css">
19+
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min.js"></script>
20+
<script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.9.2/jquery-ui.min.js"></script>
21+
<script src="http://cdnjs.cloudflare.com/ajax/libs/underscore.js/1.4.2/underscore-min.js"></script>
22+
</head>
23+
<body>
24+
<div id="header">
25+
<nav>
26+
<li><a href="index.html">Back to the Documentation</a></li>
27+
</nav>
28+
</div>
29+
<div class="wrapper">
30+
31+
<section>
32+
<h1>Josh.Shell</h1>
33+
34+
<p>It provides a simple console UI, using a <em>panel</em> for the console viewport and an auto-scrolling
35+
<em>view</em> inside the panel. It uses Underscore templates for generating the view html, although any template generator can be substituted as long as it can be expressed in the form of a function that takes a JSON object of arguments and returns an html string.
36+
</p>
37+
38+
<p>It also implements command handling so that new commands can be added by name with execution and completion handlers. Out of the box,
39+
<code>shell.js</code> provides the following commands:</p>
40+
41+
<ul>
42+
<li><code>help</code> - list all known commands (including user added)</li>
43+
<li><code>clear</code> - clear the "screen" i.e. viewport</li>
44+
<li><code>history</code> - show the command history captured by <code>readline.js</code> in <code>history.js</code>
45+
</li>
46+
</ul>
47+
48+
<h2>Functions</h2>
49+
50+
<h3>new Josh.Shell(config)</h3>
51+
<h3>isActive()</h3>
52+
<h3>activate()</h3>
53+
<h3>deactivate()</h3>
54+
<h3></h3>
55+
<h3></h3>
56+
57+
<h2>Internal Dependencies</h2>
58+
<h3>Josh.Readline</h3>
59+
<h3>Josh.History</h3>
60+
61+
<h2>External Dependencies</h2>
62+
<h3>jQuery</h3>
63+
<h3>Underscore</h3>
64+
</section>
65+
</div>
66+
<!--[if !IE]>
67+
<script>fixScale(document);</script><![endif]-->
68+
69+
</body>
70+
</html>

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.