代码之家  ›  专栏  ›  技术社区  ›  Stu Thompson Helter Scelter

Eclipse的bash脚本插件?[关闭]

  •  169
  • Stu Thompson Helter Scelter  · 技术社区  · 16 年前

    有像样的吗 bash Eclipse插件?我唯一的要求是突出显示语法。我在谷歌上搜索过,但没有看到任何类似的东西。 “” 猛击 插件。

    11 回复  |  直到 16 年前
        1
  •  137
  •   dimo414    13 年前

    ShellEd 虽然我自己没有尝试过,但看起来很有前途,语法突出,并且有积极的评论。它是 approved Redhat的发行版包含。还有一些关于 ShellEd plugin page 在Eclipse站点上,以及 installation instructions 他们的维基。

    请注意,如果您没有运行Eclipse的最新版本(在本文中,Juno),则需要使用较旧的版本,例如2.0.1与Indigo兼容。

        2
  •  36
  •   Community Mohan Dere    13 年前

    编辑 (2013年8月3日):使用 http://sourceforge.net/projects/shelled/files/shelled/update/ 最新版本

    编辑 (2/25/2013):无需在Eclipse 4.2.1上安装用于Shelled 2.0.2的Linux工具。另外,不需要下载zip文件。以下是Shelled 2.0.2的更新站点: http://sourceforge.net/projects/shelled/files/shelled/ShellEd%202.0.2/update/

    老岗位:

    我也喜欢炮击。如果现在安装,则需要下载zip文件并指向Eclipse中的“安装新软件向导”中的该文件。您还需要从安装man插件

    http://download.eclipse.org/technology/linuxtools/update
    
        3
  •  13
  •   Chandra Sekhar    14 年前

    bash版本3的调试器(bourne-again-shell)。
    Eclipse插件。只能与shell脚本编辑器shelled一起使用。 basheclipse

        4
  •  11
  •   user819893    15 年前

    按照官方指示 ShellEd's InstallGuide

        5
  •  7
  •   knb    14 年前

    自由 EclipseColorer Editor 可以为bash脚本突出显示语法。

    但是,它不使用Eclipse的“大纲视图”,也就是说,它没有用函数定义列表填充它。 有时语法高亮显示只在脚本中间停止。然后重新打开脚本会有所帮助。

        6
  •  4
  •   user3439968    11 年前

    剥壳

    下面的解决方案如何安装外壳不适合我。依赖关系上有很多错误。找到适合我的解决方案。

    系统:

    Linux lubuntu 12.04版

    石斑鱼类:

    月蚀开普勒

    在Eclipse中,转到帮助>安装新软件

    单击添加…

    添加以下位置, http://download.eclipse.org/releases/kepler 并将其命名为“Eclipse开普勒”。

    单击确定。

    选择新创建的EclipseKepler站点。

    在底部扩展Web、XML、JavaEE和OSGi企业开发部分。 选择WST服务器适配器。

    单击“下一步”,然后像往常一样安装。

    重新启动Eclipse

    然后按上述方法添加带壳回购: http://sourceforge.net/projects/shelled/files/shelled/update/

    然后安装。

    重新启动Eclipse。

    也曾在Eclipse Indigo工作,如前所述: http://docs.wraithmonster.com/install-shelled

    享受:)

        7
  •  2
  •   macm    11 年前

    我将在这里重现一个很好的教程,因为我丢失了这篇文章,需要一些时间才能再次找到它!

    使用colorer库为Eclipse添加新语言的语法突出显示

    假设您有一个包含Eclipse不支持的某些编程语言(例如d/iptables或任何其他脚本语言)的语法和词汇结构的HRC文件。

    使用EclipseColorer插件,您可以轻松地添加对它的支持。

    转到“帮助”->安装新软件,然后单击“添加”。 在“名称”字段中写入“颜色”,在“位置”字段中写入 http://colorer.sf.net/eclipsecolorer/

    选择刚添加到“工作方式:”组合框中的条目,等待组件列表填充,然后单击“全选”。

    单击下一步并按照说明操作

    安装插件后,关闭Eclipse。

    将您的HRC文件复制到 [eclipsefolder]\plugins\net.sf.colorer_0.9.9\colorer\hrc\auto\types

    [eclipsefolder]=/home/myusername/.eclipse

    使用您最喜欢的文本编辑器打开

    [eclipsefolder]\plugins\net.sf.colorer_0.9.9\colorer\hrc\auto\empty.hrc

    添加适当的原型元素。例如,如果您的hrc文件是d.hrc,则empty.hrc将如下所示:

    <?xml version="1.0" encoding='Windows-1251'?>
     <!DOCTYPE hrc PUBLIC
     "-//Cail Lomecb//DTD Colorer HRC take5//EN"
     "http://colorer.sf.net/2003/hrc.dtd"
     >
     <hrc version="take5" xmlns="http://colorer.sf.net/2003/hrc"
     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
     xsi:schemaLocation="http://colorer.sf.net/2003/hrc http://colorer.sf.net/2003/hrc.xsd"
     ><annotation><documentation>
     'auto' is a place for include
     to colorer your own HRCs
    </documentation></annotation>
        <prototype name="d" group="main" description="D">
             <location link="types/d.hrc"/>
            <filename>/\.(d)$/i</filename>
     </prototype>
    </hrc>
    

    保存更改并关闭文本编辑器

    打开Eclipse并转到窗口->首选项->常规->编辑器->文件关联

    在“文件类型”部分中,单击“添加”。并填写适当的文件类型(例如.d)

    单击“确定”,然后单击列表中新添加的条目。

    在“关联编辑器”部分中,单击“添加…”,选择“颜色编辑器”,然后按“确定”。

    好吧,最困难的部分是你必须学习HCR语法。

    你可以进去看看

    [eclipsefolder]/net.sf.colorer_0.9.9/colorer/hrc/common.jar

    了解如何操作并浏览许多其他HCR文件。目前我没有找到任何文件。

    我的天赋是一个基本和不完整的IPtables语法亮点。如果你有进步,请与我分享。

    <?xml version="1.0" encoding="Windows-1251"?>
    <!DOCTYPE hrc PUBLIC "-//Cail Lomecb//DTD Colorer HRC take5//EN" "http://colorer.sf.net/2003/hrc.dtd">
    <hrc version="take5" xmlns="http://colorer.sf.net/2003/hrc" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://colorer.sf.net/2003/hrc http://colorer.sf.net/2003/hrc.xsd">
        <type name="iptables">
            <annotation>
                <develby> Mario Moura - moura.mario  gmail.com</develby>
                <documentation>Support iptables EQL language</documentation>
                <appinfo>
                      <prototype name="iptables" group="database" description="iptables">
                           <location link="iptables.hrc"/>
                           <filename>/\.epl$/i</filename>
                      </prototype>  
                </appinfo>
            </annotation>
    
            <region name="iptablesTable" parent="def:Keyword"/>
            <region name="iptablesChainFilter" parent="def:Symbol"/>
            <region name="iptablesChainNatMangle" parent="def:NumberDec"/>
            <region name="iptablesCustomDefaultChains" parent="def:Keyword"/>
            <region name="iptablesOptions" parent="def:String"/>
            <region name="iptablesParameters" parent="def:Operator"/>
            <region name="iptablesOtherOptions" parent="def:Comment"/>
            <region name="iptablesMatchExtensions" parent="def:ParameterStrong"/>
            <region name="iptablesTargetExtensions" parent="def:FunctionKeyword"/>
            <region name="pyComment" parent="def:Comment"/>
              <region name="pyOperator" parent="def:Operator"/>
              <region name="pyDelimiter" parent="def:Symbol"/>
    
    
            <scheme name="iptablesTable">
                <keywords ignorecase="no" region="iptablesTable">
                    <word name="mangle"/>
                    <word name="filter"/>
                    <word name="nat"/>
                    <word name="as"/>
                    <word name="at"/>
                    <word name="asc"/>
                    <word name="avedev"/>
                    <word name="avg"/>
                    <word name="between"/>
                    <word name="by"/>
                </keywords>
            </scheme>
    
            <scheme name="iptablesChainFilter">
                <keywords ignorecase="no" region="iptablesChainFilter">
                    <word name="FORWARD"/>
                    <word name="INPUT"/>
                    <word name="OUTPUT"/>
                </keywords>
            </scheme>
    
            <scheme name="iptablesChainNatMangle">
                <keywords ignorecase="no" region="iptablesChainNatMangle">
                    <word name="PREROUTING"/>
                    <word name="POSTROUTING"/>
                    <word name="OUTPUT"/>
                </keywords>
            </scheme>
    
            <scheme name="iptablesCustomDefaultChains">
                <keywords ignorecase="no" region="iptablesCustomDefaultChains">
                    <word name="CHTTP"/>
                    <word name="CHTTPS"/>
                    <word name="CSSH"/>
                    <word name="CDNS"/>
                    <word name="CFTP"/>
                    <word name="CGERAL"/>
                    <word name="CICMP"/>
                </keywords>
            </scheme>
    
    
            <scheme name="iptablesOptions">
                <keywords ignorecase="no" region="iptablesOptions">
                    <word name="-A"/>
                    <word name="--append"/>
                    <word name="-D"/>
                    <word name="--delete"/>
                    <word name="-I"/>
                    <word name="--insert"/>
                    <word name="-R"/>
                    <word name="--replace"/>
                    <word name="-L"/>
                    <word name="--list"/>
                    <word name="-F"/>
                    <word name="--flush"/>
                    <word name="-Z"/>
                    <word name="--zero"/>
                    <word name="-N"/>
                    <word name="--new-chain"/>
                    <word name="-X"/>
                    <word name="--delete-chain"/>
                    <word name="-P"/>
                    <word name="--policy"/>
                    <word name="-E"/>
                    <word name="--rename-chain"/>
                </keywords>
            </scheme>
    
            <scheme name="iptablesParameters">
                <keywords ignorecase="no" region="iptablesParameters">
                    <word name="-p"/>
                    <word name="--protocol"/>
                    <word name="-s"/>
                    <word name="--source"/>
                    <word name="-d"/>
                    <word name="--destination"/>
                    <word name="-j"/>
                    <word name="--jump"/>
                    <word name="-g"/>
                    <word name="--goto"/>
                    <word name="-i"/>
                    <word name="--in-interface"/>
                    <word name="-o"/>
                    <word name="--out-interface"/>
                    <word name="-f"/>
                    <word name="--fragment"/>
                    <word name="-c"/>
                    <word name="--set-counters"/>
                </keywords>
            </scheme>
    
            <scheme name="iptablesOtherOptions">
                <keywords ignorecase="no" region="iptablesOtherOptions">
                    <word name="-v"/>
                    <word name="--verbose"/>
                    <word name="-n"/>
                    <word name="--numeric"/>
                    <word name="-x"/>
                    <word name="--exact"/>
    
                    <word name="--line-numbers"/>
                    <word name="--modprobe"/>
                </keywords>
            </scheme>
    
            <scheme name="iptablesMatchExtensions">
                <keywords ignorecase="no" region="iptablesMatchExtensions">
                    <word name="account"/>
                    <word name="addrtype"/>
                    <word name="childlevel"/>
                    <word name="comment"/>
                    <word name="connbytes"/>
                    <word name="connlimit"/>
                    <word name="connmark"/>
                    <word name="connrate"/>
                    <word name="conntrack"/>
                    <word name="dccp"/>
                    <word name="dscp"/>
                    <word name="dstlimit"/>
                    <word name="ecn"/>
                    <word name="esp"/>
                    <word name="hashlimit"/>
                    <word name="helper"/>
                    <word name="icmp"/>
                    <word name="ipv4options"/>
                    <word name="length"/>
                    <word name="limit"/>
                    <word name="mac"/>
                    <word name="mark"/>
                    <word name="mport"/>
                    <word name="multiport"/>
                    <word name="nth"/>
                    <word name="osf"/>
                    <word name="owner"/>
                    <word name="physdev"/>
                    <word name="pkttype"/>
                    <word name="policy"/>
                    <word name="psd"/>
                    <word name="quota"/>
                    <word name="realm"/>
                    <word name="recent"/>
                    <word name="sctp"/>
                    <word name="set"/>
                    <word name="state"/>
                    <word name="string"/>
                    <word name="tcp"/>
                    <word name="tcpmss"/>
                    <word name="tos"/>
                    <word name="u32"/>
                    <word name="udp"/>                                                                              
                </keywords>
            </scheme>
    
    
        <scheme name="iptablesTargetExtensions">
                <keywords ignorecase="no" region="iptablesTargetExtensions">
                    <word name="BALANCE"/>
                    <word name="CLASSIFY"/>
                    <word name="CLUSTERIP"/>
                    <word name="CONNMARK"/>
                    <word name="DNAT"/>
                    <word name="DSCP"/>
                    <word name="ECN"/>
                    <word name="IPMARK"/>
                    <word name="IPV4OPTSSTRIP"/>
                    <word name="LOG"/>
                    <word name="MARK"/>
                    <word name="MASQUERADE"/>
                    <word name="MIRROR"/>
                    <word name="NETMAP"/>
                    <word name="NFQUEUE"/>
                    <word name="NOTRACK"/>
                    <word name="REDIRECT"/>
                    <word name="REJECT"/>
                    <word name="SAME"/>
                    <word name="SET"/>
                    <word name="SNAT"/>
                    <word name="TARPIT"/>
                    <word name="TCPMSS"/>
                    <word name="TOS"/>
                    <word name="TRACE"/>
                    <word name="TTL"/>
                    <word name="ULOG"/>
                    <word name="XOR"/>                                                                          
                </keywords>
            </scheme>
    
    
    
            <scheme name="iptables">
                  <inherit scheme="iptablesTable"/>
                  <inherit scheme="iptablesChainFilter"/>
                  <inherit scheme="iptablesChainNatMangle"/>
                  <inherit scheme="iptablesCustomDefaultChains"/>                                     
                  <inherit scheme="iptablesOptions"/>
                  <inherit scheme="iptablesParameters"/>
                  <inherit scheme="iptablesOtherOptions"/>
                  <inherit scheme="iptablesMatchExtensions"/>
                  <inherit scheme="iptablesTargetExtensions"/>
    
       <!-- python operators : http://docs.python.org/ref/keywords.html -->
       <keywords region="pyOperator">
        <symb name="+"/>
        <symb name="-"/>
        <symb name="*"/>
        <symb name="**"/>
        <symb name="/"/>
        <symb name="//"/>
        <symb name="%"/>
        <symb name="&lt;&lt;"/>
        <symb name=">>"/>
        <symb name="&amp;"/>
        <symb name="|"/>
        <symb name="^"/>
        <symb name="~"/>
        <symb name="&lt;"/>
        <symb name=">"/>
        <symb name="&lt;="/>
        <symb name=">="/>
        <symb name="=="/>
        <symb name="!="/>
        <symb name="&lt;>"/>
       </keywords>
    
    
       <!-- basic python comment - consider it everything after # till the end of line -->
       <block start="/#/" end="/$/" region="pyComment" scheme="def:Comment"/>
    
       <block start="/(u|U)?(r|R)?(&quot;{3}|&apos;{3})/" end="/\y3/"
          region00="def:PairStart" region10="def:PairEnd"
          scheme="def:Comment" region="pyComment" />
          <!-- TODO: better scheme for multiline comments/docstrings -->
          <!-- scheme="StringCommon" region="pyString" /> -->
    
    
       <!-- python delimiters : http://docs.python.org/ref/delimiters.html -->
       <keywords region="pyDelimiter">
        <symb name="+"/>
        <symb name="("/>
        <symb name=")"/>
        <symb name="["/>
        <symb name="]"/>
        <symb name="{"/>
        <symb name="}"/>
        <symb name="@"/>
        <symb name=","/>
        <symb name=":"/>
        <symb name="."/>
        <symb name="`"/>
        <symb name="="/>
        <symb name=";"/>
        <symb name="+="/>
        <symb name="-="/>
        <symb name="*="/>
        <symb name="/="/>
        <symb name="//="/>
        <symb name="%="/>
        <symb name="&amp;="/>
        <symb name="|="/>
        <symb name="^="/>
        <symb name=">>="/>
        <symb name="&lt;&lt;="/>
        <symb name="**="/>
       </keywords>
    
    
    
            </scheme>
        </type>
    

    在此之后,必须将文件保存为iptables.hcr并添加到jar中:

    [eclipsefolder]/net.sf.colorer_0.9.9/colorer/hrc/common.jar

    基于: https://ohadsc.wordpress.com/2012/05/26/adding-syntax-highlighting-for-new-languages-to-eclipse-with-the-colorer-library/

        8
  •  1
  •   Steven    10 年前

    Shelled是Eclipse的一个好插件。

    这个链接帮助我安装它: http://mattnorris.me/blog/install-eclipse-shelled-plugin/

    步骤:

    1. 下载Shelled: http://sourceforge.net/projects/shelled/files/latest/download -该文件是一个压缩的归档文件,名为net.sourceforge.shelled-site-2.0.x.zip。

    2. 然后单击“帮助”>“安装新软件”…

    3. 单击添加…在右上角。
    4. 单击存档…
    5. 导航到保存压缩存档的位置net.sourceforge.shelled-site-2.0.x.zip并选择它。
    6. 单击确定。(不要担心可选的名称字段。Eclipse会自动命名。)
    7. 选中“新建外壳脚本”复选框。
    8. 单击下一步。
    9. 再次单击“下一步”。
    10. 选择“我接受许可协议的条款”。
    11. 单击“完成”。
    12. 重新启动Eclipse。
        9
  •  1
  •   de-jcup    8 年前

    现在有一个名为“bash编辑器”的专用bash脚本插件。 可在Eclipse市场购买:

    Bash editor log

    你可以在 https://marketplace.eclipse.org/content/bash-editor 或者在搜索“bash”时由市场客户提供。

    该插件当前标记为beta,但稳定。

        10
  •  0
  •   ivanlan    12 年前

    我尝试了shell,但它无法识别任何shell脚本,即使当我重新启动Eclipse时也是如此。我添加了ksh解释器并将其设为默认值,但没有什么不同。

    最后,我关闭了打开的选项卡并显示了一个ksh文件,然后重新打开它。这使它正常工作。使用一段时间后,我也可以推荐它。

        11
  •  0
  •   Alexander Ishmuradov    8 年前

    它在氧气中对我有效。

    1) 转到帮助>Eclipse市场…搜索“dltk”。您将找到类似“shell脚本(dltk)5.8.0”的内容。安装并重新启动Eclipse。

    (或将“安装”按钮从该网页拖到Eclipse: https://marketplace.eclipse.org/content/shell-script-dltk )

    Shell Script (DLTK)

    2) 右键单击Project Explorer中的shell/batch文件>用其他方式打开…然后选择Shell脚本编辑器。还可以将编辑器与该扩展名的所有文件关联。

    Shell script editor