Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/google-apps-script/6.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
jenkins如何激活“中的语法突出显示”;“建立”-&燃气轮机&引用;执行shell";_Shell_Jenkins - Fatal编程技术网

jenkins如何激活“中的语法突出显示”;“建立”-&燃气轮机&引用;执行shell";

jenkins如何激活“中的语法突出显示”;“建立”-&燃气轮机&引用;执行shell";,shell,jenkins,Shell,Jenkins,我在上个月安装了一次jenkins,我记得“Build”->“executeshell”字段中的shell脚本具有语法高亮度支持 但是现在我已经重新安装了jenkins,不再有语法突出显示了。这里有人能帮我吗 我使用的是jenkins ubuntu 1.566版我是通过让 假设已安装插件和插件,则可以添加以下脚本: Q(function() { // Append the ace editor script. Change it to your script location Q

我在上个月安装了一次jenkins,我记得“Build”->“executeshell”字段中的shell脚本具有语法高亮度支持

但是现在我已经重新安装了jenkins,不再有语法突出显示了。这里有人能帮我吗


我使用的是jenkins ubuntu 1.566版

我是通过让

假设已安装插件和插件,则可以添加以下脚本:

Q(function() {
    // Append the ace editor script. Change it to your script location
    Q('body').append('<script src="/userContent/ace/src/ace.js">');
    // Search the textarea
    Q('textarea[name="command"]').each(function(index, textarea) {
        textarea = Q(textarea);
        id = 'editor_' + index
        // Hide the original textarea
        textarea.hide();
        // Create the editor div
        textarea.after('<div id="' + id + '"/>');
        // Setup the editor
        var editor = ace.edit(id);
        editor.setOptions({
            maxLines: Infinity,
            minLines: 5,
        });
        editor.getSession().setMode('ace/mode/sh');
        // Set initial value and create the event handler
        editor.getSession().setValue(textarea.val());
        editor.getSession().on('change', function() {
            textarea.val(editor.getSession().getValue());
        });
    });
});
Q(函数(){
//附加ace编辑器脚本。将其更改为脚本位置
Q(‘正文’)。附加(“”);
//搜索文本区域
Q('textarea[name=“command”]”)。每个(函数(索引,textarea){
textarea=Q(textarea);
id='编辑器\'+索引
//隐藏原始文本区域
textarea.hide();
//创建编辑器div
text区域。在(“”)之后;
//设置编辑器
变量编辑器=ace.edit(id);
editor.setOptions({
麦克斯林:无限,
minLines:5,
});
editor.getSession().setMode('ace/mode/sh');
//设置初始值并创建事件处理程序
editor.getSession().setValue(textarea.val());
关于('change',function())的editor.getSession(){
val(editor.getSession().getValue());
});
});
});