• Login
Community
  • Login

Is there an plugin which is able to do pretty print for shell/bash?

Scheduled Pinned Locked Moved Notepad++ & Plugin Development
7 Posts 4 Posters 7.5k Views
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • B
    blueicehaller
    last edited by blueicehaller Apr 4, 2022, 4:34 PM Apr 4, 2022, 4:32 PM

    Hi,
    I would like to know if is there an plugins which is able to do pretty print for shell/bash?

    I have the 64-bit x64 Version installed.

    The following plugins are able to do it for these languages:

    • JSON
      • JSON Viewer
      • JSTool
    • XML
      • XML Tools

    Do you know further plugins?

    Thank you in advance.

    P 1 Reply Last reply Apr 4, 2022, 4:55 PM Reply Quote 0
    • P
      PeterJones @blueicehaller
      last edited by Apr 4, 2022, 4:55 PM

      @blueicehaller ,

      I do not know of such a plugin directly.

      However, as a workaround: using the NppExec plugin, you can call any external pretty-print program and have it filter the contents of the active Notepad++ file through that pretty-print and back into Notepad++. @Michael-Vincent shares an example script that does it for C, HTML, Perl, and Python in this post. So if you know of an external command-line utility that pretty-prints shell/bash, then you can use it in conjunction with the NppExec plugin to pretty-print inside of Notepad++.

      B 1 Reply Last reply Apr 4, 2022, 10:54 PM Reply Quote 2
      • B
        blueicehaller @PeterJones
        last edited by Apr 4, 2022, 10:54 PM

        @peterjones

        I did not use them yet:

        • https://github.com/mvdan/sh
          • https://github.com/mvdan/sh#shfmt
          • https://github.com/mvdan/sh#related-projects
        • Eclipse IDE
          • https://stackoverflow.com/questions/15655126/how-to-auto-format-code-in-eclipse
        • https://stackoverflow.com/questions/3987382/pretty-print-for-shell-script
        B 1 Reply Last reply Apr 5, 2022, 12:52 AM Reply Quote 0
        • B
          blueicehaller @blueicehaller
          last edited by blueicehaller Apr 5, 2022, 12:52 AM Apr 5, 2022, 12:52 AM

          • Eclipse IDE
            • Eclipse Marketplace
              • To be able to open .bash files I need to install Shell Wax first
              • Then I tried out Bash Editor
          1 Reply Last reply Reply Quote 0
          • B
            blueicehaller
            last edited by blueicehaller Feb 21, 2023, 7:15 PM Feb 21, 2023, 7:12 PM

            In the Eclipse IDE preferences you can optionally activate Bash Editor to execute Beautysh as save action.
            To my understanding this requires Linux.

            Maybe it runs in Cygwin or MinGW?

            A M 2 Replies Last reply Feb 21, 2023, 7:23 PM Reply Quote 0
            • A
              Alan Kilborn @blueicehaller
              last edited by Feb 21, 2023, 7:23 PM

              @blueicehaller said in Is there an plugin which is able to do pretty print for shell/bash?:

              In the Eclipse IDE preferences you can optionally activate Bash Editor to execute Beautysh as save action.
              To my understanding this requires Linux.
              Maybe it runs in Cygwin or MinGW?

              This is not on-topic for a question on a Notepad++ forum. Please find a more-appropriate forum in which to pursue this.

              1 Reply Last reply Reply Quote 0
              • M
                Michael Vincent @blueicehaller
                last edited by Feb 21, 2023, 9:54 PM

                @blueicehaller said in Is there an plugin which is able to do pretty print for shell/bash?:

                To my understanding this requires Linux.

                Why? It seems to be written in Python.

                Cheers.

                1 Reply Last reply Reply Quote 1
                • First post
                  Last post
                The Community of users of the Notepad++ text editor.
                Powered by NodeBB | Contributors