Sha256: 737a094157242301c01486202cd0e6651c38345a3dd4d1f45fcdc9b3dda0ff14

Contents?: true

Size: 1.68 KB

Versions: 23

Compression:

Stored size: 1.68 KB

Contents

CodeMirror.defineMode("shell",function(){function e(e,t){for(var n=t.split(" "),r=0;r<n.length;r++)i[n[r]]=e}function t(e,t){var s=e.sol(),u=e.next();if("'"===u||'"'===u||"`"===u)return t.tokens.unshift(n(u)),r(e,t);if("#"===u)return s&&e.eat("!")?(e.skipToEnd(),"meta"):(e.skipToEnd(),"comment");if("$"===u)return t.tokens.unshift(o),r(e,t);if("+"===u||"="===u)return"operator";if("-"===u)return e.eat("-"),e.eatWhile(/\w/),"attribute";if(/\d/.test(u)&&(e.eatWhile(/\d/),!/\w/.test(e.peek())))return"number";e.eatWhile(/\w/);var a=e.current();return"="===e.peek()&&/\w+/.test(a)?"def":i.hasOwnProperty(a)?i[a]:null}function n(e){return function(t,n){for(var r,i=!1,s=!1;null!=(r=t.next());){if(r===e&&!s){i=!0;break}if("$"===r&&!s&&"'"!==e){s=!0,t.backUp(1),n.tokens.unshift(o);break}s=!s&&"\\"===r}return(i||!s)&&n.tokens.shift(),"`"===e||")"===e?"quote":"string"}}function r(e,n){return(n.tokens[0]||t)(e,n)}var i={};e("atom","true false"),e("keyword","if then do else elif while until for in esac fi fin fil done exit set unset export function"),e("builtin","ab awk bash beep cat cc cd chown chmod chroot clear cp curl cut diff echo find gawk gcc get git grep kill killall ln ls make mkdir openssl mv nc node npm ping ps restart rm rmdir sed service sh shopt shred source sort sleep ssh start stop su sudo tee telnet top touch vi vim wall wc wget who write yes zsh");var o=function(e,t){t.tokens.length>1&&e.eat("$");var i=e.next(),o=/\w/;return"{"===i&&(o=/[^}]/),"("===i?(t.tokens[0]=n(")"),r(e,t)):(/\d/.test(i)||(e.eatWhile(o),e.eat("}")),t.tokens.shift(),"def")};return{startState:function(){return{tokens:[]}},token:function(e,t){return e.eatSpace()?null:r(e,t)}}}),CodeMirror.defineMIME("text/x-sh","shell");

Version data entries

23 entries across 23 versions & 1 rubygems

Version Path
rearview-1.2.3-jruby public/rearview/vendor/codemirror/mode/shell/shell.js
rearview-1.2.2.rc.2-jruby public/rearview/vendor/codemirror/mode/shell/shell.js
rearview-1.2.2.rc.1-jruby public/rearview/vendor/codemirror/mode/shell/shell.js
rearview-1.2.1-jruby public/rearview/vendor/codemirror/mode/shell/shell.js
rearview-1.2.0-jruby public/rearview/vendor/codemirror/mode/shell/shell.js
rearview-1.1.2-jruby public/rearview/vendor/codemirror/mode/shell/shell.js
rearview-1.1.1-jruby public/rearview/vendor/codemirror/mode/shell/shell.js
rearview-1.1.0-jruby public/rearview/vendor/codemirror/mode/shell/shell.js
rearview-1.0.3.rc.4-jruby public/rearview/vendor/codemirror/mode/shell/shell.js
rearview-1.0.3.rc.3-jruby public/rearview/vendor/codemirror/mode/shell/shell.js
rearview-1.0.3.rc.2-jruby public/rearview/vendor/codemirror/mode/shell/shell.js
rearview-1.0.3.rc.1-jruby public/rearview/vendor/codemirror/mode/shell/shell.js
rearview-1.0.2-jruby public/rearview/vendor/codemirror/mode/shell/shell.js
rearview-1.0.2.rc.4-jruby public/rearview/vendor/codemirror/mode/shell/shell.js
rearview-1.0.2.rc.3-jruby public/rearview/vendor/codemirror/mode/shell/shell.js
rearview-1.0.2.rc.2-jruby public/rearview/vendor/codemirror/mode/shell/shell.js
rearview-1.0.2.rc.1-jruby public/rearview/vendor/codemirror/mode/shell/shell.js
rearview-1.0.1-jruby public/rearview/vendor/codemirror/mode/shell/shell.js
rearview-1.0.0-jruby public/rearview/vendor/codemirror/mode/shell/shell.js
rearview-1.0.0.rc5-jruby public/rearview/vendor/codemirror/mode/shell/shell.js