|
| 1 | +<?xml version="1.0" encoding="iso-8859-1"?> |
| 2 | +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" |
| 3 | + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> |
| 4 | +<html xmlns="http://www.w3.org/1999/xhtml" |
| 5 | +lang="en" xml:lang="en"> |
| 6 | +<head> |
| 7 | +<title>Starter Kit Eshell</title> |
| 8 | +<meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"/> |
| 9 | +<meta name="generator" content="Org-mode"/> |
| 10 | +<meta name="generated" content="2011-06-16 15:51:42 PDT"/> |
| 11 | +<meta name="author" content="Eric Schulte"/> |
| 12 | +<meta name="description" content=""/> |
| 13 | +<meta name="keywords" content=""/> |
| 14 | +<style type="text/css"> |
| 15 | + <!--/*--><![CDATA[/*><!--*/ |
| 16 | + html { font-family: Times, serif; font-size: 12pt; } |
| 17 | + .title { text-align: center; } |
| 18 | + .todo { color: red; } |
| 19 | + .done { color: green; } |
| 20 | + .tag { background-color: #add8e6; font-weight:normal } |
| 21 | + .target { } |
| 22 | + .timestamp { color: #bebebe; } |
| 23 | + .timestamp-kwd { color: #5f9ea0; } |
| 24 | + .right {margin-left:auto; margin-right:0px; text-align:right;} |
| 25 | + .left {margin-left:0px; margin-right:auto; text-align:left;} |
| 26 | + .center {margin-left:auto; margin-right:auto; text-align:center;} |
| 27 | + p.verse { margin-left: 3% } |
| 28 | + pre { |
| 29 | + border: 1pt solid #AEBDCC; |
| 30 | + background-color: #F3F5F7; |
| 31 | + padding: 5pt; |
| 32 | + font-family: courier, monospace; |
| 33 | + font-size: 90%; |
| 34 | + overflow:auto; |
| 35 | + } |
| 36 | + table { border-collapse: collapse; } |
| 37 | + td, th { vertical-align: top; } |
| 38 | + th.right { text-align:center; } |
| 39 | + th.left { text-align:center; } |
| 40 | + th.center { text-align:center; } |
| 41 | + td.right { text-align:right; } |
| 42 | + td.left { text-align:left; } |
| 43 | + td.center { text-align:center; } |
| 44 | + dt { font-weight: bold; } |
| 45 | + div.figure { padding: 0.5em; } |
| 46 | + div.figure p { text-align: center; } |
| 47 | + textarea { overflow-x: auto; } |
| 48 | + .linenr { font-size:smaller } |
| 49 | + .code-highlighted {background-color:#ffff00;} |
| 50 | + .org-info-js_info-navigation { border-style:none; } |
| 51 | + #org-info-js_console-label { font-size:10px; font-weight:bold; |
| 52 | + white-space:nowrap; } |
| 53 | + .org-info-js_search-highlight {background-color:#ffff00; color:#000000; |
| 54 | + font-weight:bold; } |
| 55 | + /*]]>*/--> |
| 56 | +</style><link rel="stylesheet" href="emacs.css" type="text/css"/> |
| 57 | +<style type="text/css"> |
| 58 | + pre{background:#232323; color:#E6E1DC; padding:1em 1em 0 1em;} |
| 59 | + code{font-size:10pt; color:#353535;} |
| 60 | + .outline-text-2{margin-left: 1em;} |
| 61 | + .outline-text-3{margin-left: 2em;} |
| 62 | + .outline-text-3{margin-left: 3em;} |
| 63 | +</style> |
| 64 | +<script type="text/javascript"> |
| 65 | +<!--/*--><![CDATA[/*><!--*/ |
| 66 | + function CodeHighlightOn(elem, id) |
| 67 | + { |
| 68 | + var target = document.getElementById(id); |
| 69 | + if(null != target) { |
| 70 | + elem.cacheClassElem = elem.className; |
| 71 | + elem.cacheClassTarget = target.className; |
| 72 | + target.className = "code-highlighted"; |
| 73 | + elem.className = "code-highlighted"; |
| 74 | + } |
| 75 | + } |
| 76 | + function CodeHighlightOff(elem, id) |
| 77 | + { |
| 78 | + var target = document.getElementById(id); |
| 79 | + if(elem.cacheClassElem) |
| 80 | + elem.className = elem.cacheClassElem; |
| 81 | + if(elem.cacheClassTarget) |
| 82 | + target.className = elem.cacheClassTarget; |
| 83 | + } |
| 84 | +/*]]>*///--> |
| 85 | +</script> |
| 86 | + |
| 87 | +</head> |
| 88 | +<body> |
| 89 | +<div id="content"> |
| 90 | + |
| 91 | +<h1 class="title">Starter Kit Eshell</h1> |
| 92 | +<p>This is part of the <a href="starter-kit.html">Emacs Starter Kit</a>. |
| 93 | +</p> |
| 94 | + |
| 95 | +<div id="outline-container-1" class="outline-2"> |
| 96 | +<h2 id="sec-1">Starter Kit Eshell </h2> |
| 97 | +<div class="outline-text-2" id="text-1"> |
| 98 | + |
| 99 | +<p><a href="http://www.emacswiki.org/emacs/CategoryEshell">Eshell</a> is a great shell. |
| 100 | +</p> |
| 101 | + |
| 102 | + |
| 103 | + |
| 104 | +<pre class="src src-emacs-lisp">(setq eshell-cmpl-cycle-completions nil |
| 105 | + eshell-save-history-on-exit t |
| 106 | + eshell-cmpl-dir-ignore <span class="org-string">"\\`</span><span class="org-string"><span class="org-regexp-grouping-backslash">\\</span></span><span class="org-string"><span class="org-regexp-grouping-construct">(</span></span><span class="org-string">\\.\\.?</span><span class="org-string"><span class="org-regexp-grouping-backslash">\\</span></span><span class="org-string"><span class="org-regexp-grouping-construct">|</span></span><span class="org-string">CVS</span><span class="org-string"><span class="org-regexp-grouping-backslash">\\</span></span><span class="org-string"><span class="org-regexp-grouping-construct">|</span></span><span class="org-string">\\.svn</span><span class="org-string"><span class="org-regexp-grouping-backslash">\\</span></span><span class="org-string"><span class="org-regexp-grouping-construct">|</span></span><span class="org-string">\\.git</span><span class="org-string"><span class="org-regexp-grouping-backslash">\\</span></span><span class="org-string"><span class="org-regexp-grouping-construct">)</span></span><span class="org-string">/\\'"</span>) |
| 107 | + |
| 108 | +(<span class="org-keyword">eval-after-load</span> 'esh-opt |
| 109 | + '(<span class="org-keyword">progn</span> |
| 110 | + (<span class="org-keyword">require</span> '<span class="org-constant">em-cmpl</span>) |
| 111 | + (<span class="org-keyword">require</span> '<span class="org-constant">em-prompt</span>) |
| 112 | + (<span class="org-keyword">require</span> '<span class="org-constant">em-term</span>) |
| 113 | + <span class="org-comment-delimiter">;; </span><span class="org-comment">TODO: for some reason requiring this here breaks it, but</span> |
| 114 | + <span class="org-comment-delimiter">;; </span><span class="org-comment">requiring it after an eshell session is started works fine.</span> |
| 115 | + <span class="org-comment-delimiter">;; </span><span class="org-comment">(require 'eshell-vc)</span> |
| 116 | + (setenv <span class="org-string">"PAGER"</span> <span class="org-string">"cat"</span>) |
| 117 | + <span class="org-comment-delimiter">; </span><span class="org-comment">(set-face-attribute 'eshell-prompt nil :foreground "turquoise1")</span> |
| 118 | + (add-hook 'eshell-mode-hook <span class="org-comment-delimiter">;; </span><span class="org-comment">for some reason this needs to be a hook</span> |
| 119 | + '(<span class="org-keyword">lambda</span> () (define-key eshell-mode-map <span class="org-string">"\C-a"</span> 'eshell-bol))) |
| 120 | + (add-to-list 'eshell-visual-commands <span class="org-string">"ssh"</span>) |
| 121 | + (add-to-list 'eshell-visual-commands <span class="org-string">"tail"</span>) |
| 122 | + (add-to-list 'eshell-command-completions-alist |
| 123 | + '(<span class="org-string">"gunzip"</span> <span class="org-string">"gz\\'"</span>)) |
| 124 | + (add-to-list 'eshell-command-completions-alist |
| 125 | + '(<span class="org-string">"tar"</span> <span class="org-string">"</span><span class="org-string"><span class="org-regexp-grouping-backslash">\\</span></span><span class="org-string"><span class="org-regexp-grouping-construct">(</span></span><span class="org-string">\\.tar|\\.tgz</span><span class="org-string"><span class="org-regexp-grouping-backslash">\\</span></span><span class="org-string"><span class="org-regexp-grouping-construct">|</span></span><span class="org-string">\\.tar\\.gz</span><span class="org-string"><span class="org-regexp-grouping-backslash">\\</span></span><span class="org-string"><span class="org-regexp-grouping-construct">)</span></span><span class="org-string">\\'"</span>)) |
| 126 | + (add-to-list 'eshell-output-filter-functions 'eshell-handle-ansi-color))) |
| 127 | + |
| 128 | +</pre> |
| 129 | + |
| 130 | + |
| 131 | + |
| 132 | +<p> |
| 133 | +The <code>eshell</code> directory holds alias definitions and history |
| 134 | +information. It is much like a <code>.bashrc</code> file for those who are |
| 135 | +familiar with bash. This set the value of <code>eshell-directory-name</code> to |
| 136 | +point to the <code>eshell</code> directory in this directory. The <code>alias</code> file |
| 137 | +is pre-populated with some generally applicable aliases. |
| 138 | +</p> |
| 139 | + |
| 140 | + |
| 141 | + |
| 142 | +<pre class="src src-emacs-lisp">(setq eshell-directory-name |
| 143 | + (expand-file-name <span class="org-string">"./"</span> (expand-file-name <span class="org-string">"eshell"</span> starter-kit-dir))) |
| 144 | + |
| 145 | +</pre> |
| 146 | + |
| 147 | + |
| 148 | + |
| 149 | +</div> |
| 150 | +</div> |
| 151 | + |
| 152 | +</div> |
| 153 | +</body> |
| 154 | +</html> |
0 commit comments