Add autocompletion in dash

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP












3















Is it possible to get at least "some" autocompletion in a dash shell like in bash?



At least for the existing filenames in a path.










share|improve this question




























    3















    Is it possible to get at least "some" autocompletion in a dash shell like in bash?



    At least for the existing filenames in a path.










    share|improve this question


























      3












      3








      3


      1






      Is it possible to get at least "some" autocompletion in a dash shell like in bash?



      At least for the existing filenames in a path.










      share|improve this question
















      Is it possible to get at least "some" autocompletion in a dash shell like in bash?



      At least for the existing filenames in a path.







      autocomplete dash






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Sep 30 '14 at 8:30







      rubo77

















      asked Sep 30 '14 at 8:10









      rubo77rubo77

      7,6572573134




      7,6572573134




















          2 Answers
          2






          active

          oldest

          votes


















          3














          No, dash doesn't have completion. Otherwise it would be called bash. Dash was designed to execute shell scripts fast and with a minimum of memory, it wasn't intended to be used interactively.



          The best way to get completion in dash is to run exec zsh or exec fish. Or, if you want to stick with a shell that doesn't use much memory, use a BusyBox sh build that includes completion.



          If you want to stick with dash, you can do what people did before completion existed: use wildcards. For example, instead of typing a prefix of a file name and then pressing Tab, type a prefix of a file name and then type *. The prefix needs to be unique, otherwise multiple file names will be interpolated.



          To list “completions”, call ls or run echo on the wildcard pattern.



          If you use the same file name (or other string) multiple times, store it in a variable.






          share|improve this answer

























          • exec fish just closed it here (using yakuake with dash as default)

            – Aquarius Power
            Jan 23 at 15:28






          • 1





            @AquariusPower Because you did not have the fish shell installed. Both of those commands simply starts another shell in place of the current dash shell (I assume the commands were meant as a kind of a joke).

            – Kusalananda
            Jan 23 at 15:56


















          0














          Suggesting an alternative (@...)



          why dash? for me is the resident memory usage. (I use yakuake and each bash tab is 34MB here. dash is 708KB.) The problem is I am often typing bash to have autocompletion.



          The alternative: yash RSS=1080KB, has excellent auto-completion (may be even friendlier than bash's one). I set it as default on yakuake and no matter how many tabs I open it is very easy on memory.



          complementing https://unix.stackexchange.com/a/158523/30352:
          exec zsh used 5.5MB RSS (...@) as you may not want to stick with dash :)



          Obs.: RSS thru htop






          share|improve this answer






















            Your Answer








            StackExchange.ready(function()
            var channelOptions =
            tags: "".split(" "),
            id: "106"
            ;
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function()
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled)
            StackExchange.using("snippets", function()
            createEditor();
            );

            else
            createEditor();

            );

            function createEditor()
            StackExchange.prepareEditor(
            heartbeatType: 'answer',
            autoActivateHeartbeat: false,
            convertImagesToLinks: false,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: null,
            bindNavPrevention: true,
            postfix: "",
            imageUploader:
            brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
            contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
            allowUrls: true
            ,
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            );



            );













            draft saved

            draft discarded


















            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f158369%2fadd-autocompletion-in-dash%23new-answer', 'question_page');

            );

            Post as a guest















            Required, but never shown

























            2 Answers
            2






            active

            oldest

            votes








            2 Answers
            2






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            3














            No, dash doesn't have completion. Otherwise it would be called bash. Dash was designed to execute shell scripts fast and with a minimum of memory, it wasn't intended to be used interactively.



            The best way to get completion in dash is to run exec zsh or exec fish. Or, if you want to stick with a shell that doesn't use much memory, use a BusyBox sh build that includes completion.



            If you want to stick with dash, you can do what people did before completion existed: use wildcards. For example, instead of typing a prefix of a file name and then pressing Tab, type a prefix of a file name and then type *. The prefix needs to be unique, otherwise multiple file names will be interpolated.



            To list “completions”, call ls or run echo on the wildcard pattern.



            If you use the same file name (or other string) multiple times, store it in a variable.






            share|improve this answer

























            • exec fish just closed it here (using yakuake with dash as default)

              – Aquarius Power
              Jan 23 at 15:28






            • 1





              @AquariusPower Because you did not have the fish shell installed. Both of those commands simply starts another shell in place of the current dash shell (I assume the commands were meant as a kind of a joke).

              – Kusalananda
              Jan 23 at 15:56















            3














            No, dash doesn't have completion. Otherwise it would be called bash. Dash was designed to execute shell scripts fast and with a minimum of memory, it wasn't intended to be used interactively.



            The best way to get completion in dash is to run exec zsh or exec fish. Or, if you want to stick with a shell that doesn't use much memory, use a BusyBox sh build that includes completion.



            If you want to stick with dash, you can do what people did before completion existed: use wildcards. For example, instead of typing a prefix of a file name and then pressing Tab, type a prefix of a file name and then type *. The prefix needs to be unique, otherwise multiple file names will be interpolated.



            To list “completions”, call ls or run echo on the wildcard pattern.



            If you use the same file name (or other string) multiple times, store it in a variable.






            share|improve this answer

























            • exec fish just closed it here (using yakuake with dash as default)

              – Aquarius Power
              Jan 23 at 15:28






            • 1





              @AquariusPower Because you did not have the fish shell installed. Both of those commands simply starts another shell in place of the current dash shell (I assume the commands were meant as a kind of a joke).

              – Kusalananda
              Jan 23 at 15:56













            3












            3








            3







            No, dash doesn't have completion. Otherwise it would be called bash. Dash was designed to execute shell scripts fast and with a minimum of memory, it wasn't intended to be used interactively.



            The best way to get completion in dash is to run exec zsh or exec fish. Or, if you want to stick with a shell that doesn't use much memory, use a BusyBox sh build that includes completion.



            If you want to stick with dash, you can do what people did before completion existed: use wildcards. For example, instead of typing a prefix of a file name and then pressing Tab, type a prefix of a file name and then type *. The prefix needs to be unique, otherwise multiple file names will be interpolated.



            To list “completions”, call ls or run echo on the wildcard pattern.



            If you use the same file name (or other string) multiple times, store it in a variable.






            share|improve this answer















            No, dash doesn't have completion. Otherwise it would be called bash. Dash was designed to execute shell scripts fast and with a minimum of memory, it wasn't intended to be used interactively.



            The best way to get completion in dash is to run exec zsh or exec fish. Or, if you want to stick with a shell that doesn't use much memory, use a BusyBox sh build that includes completion.



            If you want to stick with dash, you can do what people did before completion existed: use wildcards. For example, instead of typing a prefix of a file name and then pressing Tab, type a prefix of a file name and then type *. The prefix needs to be unique, otherwise multiple file names will be interpolated.



            To list “completions”, call ls or run echo on the wildcard pattern.



            If you use the same file name (or other string) multiple times, store it in a variable.







            share|improve this answer














            share|improve this answer



            share|improve this answer








            edited Jan 23 at 22:27

























            answered Sep 30 '14 at 22:43









            GillesGilles

            536k12810821600




            536k12810821600












            • exec fish just closed it here (using yakuake with dash as default)

              – Aquarius Power
              Jan 23 at 15:28






            • 1





              @AquariusPower Because you did not have the fish shell installed. Both of those commands simply starts another shell in place of the current dash shell (I assume the commands were meant as a kind of a joke).

              – Kusalananda
              Jan 23 at 15:56

















            • exec fish just closed it here (using yakuake with dash as default)

              – Aquarius Power
              Jan 23 at 15:28






            • 1





              @AquariusPower Because you did not have the fish shell installed. Both of those commands simply starts another shell in place of the current dash shell (I assume the commands were meant as a kind of a joke).

              – Kusalananda
              Jan 23 at 15:56
















            exec fish just closed it here (using yakuake with dash as default)

            – Aquarius Power
            Jan 23 at 15:28





            exec fish just closed it here (using yakuake with dash as default)

            – Aquarius Power
            Jan 23 at 15:28




            1




            1





            @AquariusPower Because you did not have the fish shell installed. Both of those commands simply starts another shell in place of the current dash shell (I assume the commands were meant as a kind of a joke).

            – Kusalananda
            Jan 23 at 15:56





            @AquariusPower Because you did not have the fish shell installed. Both of those commands simply starts another shell in place of the current dash shell (I assume the commands were meant as a kind of a joke).

            – Kusalananda
            Jan 23 at 15:56













            0














            Suggesting an alternative (@...)



            why dash? for me is the resident memory usage. (I use yakuake and each bash tab is 34MB here. dash is 708KB.) The problem is I am often typing bash to have autocompletion.



            The alternative: yash RSS=1080KB, has excellent auto-completion (may be even friendlier than bash's one). I set it as default on yakuake and no matter how many tabs I open it is very easy on memory.



            complementing https://unix.stackexchange.com/a/158523/30352:
            exec zsh used 5.5MB RSS (...@) as you may not want to stick with dash :)



            Obs.: RSS thru htop






            share|improve this answer



























              0














              Suggesting an alternative (@...)



              why dash? for me is the resident memory usage. (I use yakuake and each bash tab is 34MB here. dash is 708KB.) The problem is I am often typing bash to have autocompletion.



              The alternative: yash RSS=1080KB, has excellent auto-completion (may be even friendlier than bash's one). I set it as default on yakuake and no matter how many tabs I open it is very easy on memory.



              complementing https://unix.stackexchange.com/a/158523/30352:
              exec zsh used 5.5MB RSS (...@) as you may not want to stick with dash :)



              Obs.: RSS thru htop






              share|improve this answer

























                0












                0








                0







                Suggesting an alternative (@...)



                why dash? for me is the resident memory usage. (I use yakuake and each bash tab is 34MB here. dash is 708KB.) The problem is I am often typing bash to have autocompletion.



                The alternative: yash RSS=1080KB, has excellent auto-completion (may be even friendlier than bash's one). I set it as default on yakuake and no matter how many tabs I open it is very easy on memory.



                complementing https://unix.stackexchange.com/a/158523/30352:
                exec zsh used 5.5MB RSS (...@) as you may not want to stick with dash :)



                Obs.: RSS thru htop






                share|improve this answer













                Suggesting an alternative (@...)



                why dash? for me is the resident memory usage. (I use yakuake and each bash tab is 34MB here. dash is 708KB.) The problem is I am often typing bash to have autocompletion.



                The alternative: yash RSS=1080KB, has excellent auto-completion (may be even friendlier than bash's one). I set it as default on yakuake and no matter how many tabs I open it is very easy on memory.



                complementing https://unix.stackexchange.com/a/158523/30352:
                exec zsh used 5.5MB RSS (...@) as you may not want to stick with dash :)



                Obs.: RSS thru htop







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Jan 23 at 15:37









                Aquarius PowerAquarius Power

                1,70932137




                1,70932137



























                    draft saved

                    draft discarded
















































                    Thanks for contributing an answer to Unix & Linux Stack Exchange!


                    • Please be sure to answer the question. Provide details and share your research!

                    But avoid


                    • Asking for help, clarification, or responding to other answers.

                    • Making statements based on opinion; back them up with references or personal experience.

                    To learn more, see our tips on writing great answers.




                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function ()
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f158369%2fadd-autocompletion-in-dash%23new-answer', 'question_page');

                    );

                    Post as a guest















                    Required, but never shown





















































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown

































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown






                    Popular posts from this blog

                    How to check contact read email or not when send email to Individual?

                    Bahrain

                    Postfix configuration issue with fips on centos 7; mailgun relay