Bash tab completion stop searching

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












7















When I am typing into bash and I press the "tab" key to auto complete, sometimes it takes a significant time. E.g., file IO to read directories takes >5 seconds, and thus I am hung waiting for IO to complete before I can continue typing. I get frustrated and Ctrl-C so that I can redo what I was typing.



Ctrl-C is unfortunate, since I must retype everything again. How can I tell bash to stop trying to fulfill my auto complete request.



$ /long/path/to/some/d # once I've typed this, I press <TAB>. I now will be
# stuck waiting for perhaps 10 seconds. The only thing I
# know to do is Ctrl-C. When I press Ctrl-C, I am forced
# to retype the original command string.
$









share|improve this question






















  • You might want to take a look into this. ubuntuforums.org/showthread.php?t=1865538

    – Ramesh
    Mar 20 '14 at 14:42















7















When I am typing into bash and I press the "tab" key to auto complete, sometimes it takes a significant time. E.g., file IO to read directories takes >5 seconds, and thus I am hung waiting for IO to complete before I can continue typing. I get frustrated and Ctrl-C so that I can redo what I was typing.



Ctrl-C is unfortunate, since I must retype everything again. How can I tell bash to stop trying to fulfill my auto complete request.



$ /long/path/to/some/d # once I've typed this, I press <TAB>. I now will be
# stuck waiting for perhaps 10 seconds. The only thing I
# know to do is Ctrl-C. When I press Ctrl-C, I am forced
# to retype the original command string.
$









share|improve this question






















  • You might want to take a look into this. ubuntuforums.org/showthread.php?t=1865538

    – Ramesh
    Mar 20 '14 at 14:42













7












7








7


1






When I am typing into bash and I press the "tab" key to auto complete, sometimes it takes a significant time. E.g., file IO to read directories takes >5 seconds, and thus I am hung waiting for IO to complete before I can continue typing. I get frustrated and Ctrl-C so that I can redo what I was typing.



Ctrl-C is unfortunate, since I must retype everything again. How can I tell bash to stop trying to fulfill my auto complete request.



$ /long/path/to/some/d # once I've typed this, I press <TAB>. I now will be
# stuck waiting for perhaps 10 seconds. The only thing I
# know to do is Ctrl-C. When I press Ctrl-C, I am forced
# to retype the original command string.
$









share|improve this question














When I am typing into bash and I press the "tab" key to auto complete, sometimes it takes a significant time. E.g., file IO to read directories takes >5 seconds, and thus I am hung waiting for IO to complete before I can continue typing. I get frustrated and Ctrl-C so that I can redo what I was typing.



Ctrl-C is unfortunate, since I must retype everything again. How can I tell bash to stop trying to fulfill my auto complete request.



$ /long/path/to/some/d # once I've typed this, I press <TAB>. I now will be
# stuck waiting for perhaps 10 seconds. The only thing I
# know to do is Ctrl-C. When I press Ctrl-C, I am forced
# to retype the original command string.
$






bash autocomplete






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Mar 20 '14 at 14:37









ChrisChris

32349




32349












  • You might want to take a look into this. ubuntuforums.org/showthread.php?t=1865538

    – Ramesh
    Mar 20 '14 at 14:42

















  • You might want to take a look into this. ubuntuforums.org/showthread.php?t=1865538

    – Ramesh
    Mar 20 '14 at 14:42
















You might want to take a look into this. ubuntuforums.org/showthread.php?t=1865538

– Ramesh
Mar 20 '14 at 14:42





You might want to take a look into this. ubuntuforums.org/showthread.php?t=1865538

– Ramesh
Mar 20 '14 at 14:42










3 Answers
3






active

oldest

votes


















1














I just found this here.



Use Ctrl+. It will stop the completion and go back to your command line without loosing the current command.






share|improve this answer























  • Unfortunately this didn't work for me on Ubuntu

    – josh
    Jan 18 at 10:09


















0














You can have similar problems without tab completion. This does not introduce a technical difference i.e. the same solutions apply.



One possibility is to start the search in the background and write the result to a FIFO. You can read from the FIFO with a timeout then (read -t 0.3 ...).



I guess I have seen a simpler solution than FIFOs here recently... but currently I don't remember that. read -t works with a pipeline, too, but the finishing of read does not kill the earlier parts of the pipeline and the pipeline returns only after all of its parts have finished.






share|improve this answer























  • how is this relevant to the question…?

    – lensovet
    Nov 15 '16 at 7:45











  • @lensovet If there seems not to be way to solve the problem in the requested way (i.e. aborting the search) then a hint how to (at least partly) avoid the problem seems quite useful to me.

    – Hauke Laging
    Jan 2 '17 at 0:39


















0














On Ubuntu 16.04 hitting q worked for me.



See this https://unix.stackexchange.com/a/341025/332159.






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%2f120602%2fbash-tab-completion-stop-searching%23new-answer', 'question_page');

    );

    Post as a guest















    Required, but never shown

























    3 Answers
    3






    active

    oldest

    votes








    3 Answers
    3






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    1














    I just found this here.



    Use Ctrl+. It will stop the completion and go back to your command line without loosing the current command.






    share|improve this answer























    • Unfortunately this didn't work for me on Ubuntu

      – josh
      Jan 18 at 10:09















    1














    I just found this here.



    Use Ctrl+. It will stop the completion and go back to your command line without loosing the current command.






    share|improve this answer























    • Unfortunately this didn't work for me on Ubuntu

      – josh
      Jan 18 at 10:09













    1












    1








    1







    I just found this here.



    Use Ctrl+. It will stop the completion and go back to your command line without loosing the current command.






    share|improve this answer













    I just found this here.



    Use Ctrl+. It will stop the completion and go back to your command line without loosing the current command.







    share|improve this answer












    share|improve this answer



    share|improve this answer










    answered Sep 20 '17 at 17:51









    Robin ThoniRobin Thoni

    1113




    1113












    • Unfortunately this didn't work for me on Ubuntu

      – josh
      Jan 18 at 10:09

















    • Unfortunately this didn't work for me on Ubuntu

      – josh
      Jan 18 at 10:09
















    Unfortunately this didn't work for me on Ubuntu

    – josh
    Jan 18 at 10:09





    Unfortunately this didn't work for me on Ubuntu

    – josh
    Jan 18 at 10:09













    0














    You can have similar problems without tab completion. This does not introduce a technical difference i.e. the same solutions apply.



    One possibility is to start the search in the background and write the result to a FIFO. You can read from the FIFO with a timeout then (read -t 0.3 ...).



    I guess I have seen a simpler solution than FIFOs here recently... but currently I don't remember that. read -t works with a pipeline, too, but the finishing of read does not kill the earlier parts of the pipeline and the pipeline returns only after all of its parts have finished.






    share|improve this answer























    • how is this relevant to the question…?

      – lensovet
      Nov 15 '16 at 7:45











    • @lensovet If there seems not to be way to solve the problem in the requested way (i.e. aborting the search) then a hint how to (at least partly) avoid the problem seems quite useful to me.

      – Hauke Laging
      Jan 2 '17 at 0:39















    0














    You can have similar problems without tab completion. This does not introduce a technical difference i.e. the same solutions apply.



    One possibility is to start the search in the background and write the result to a FIFO. You can read from the FIFO with a timeout then (read -t 0.3 ...).



    I guess I have seen a simpler solution than FIFOs here recently... but currently I don't remember that. read -t works with a pipeline, too, but the finishing of read does not kill the earlier parts of the pipeline and the pipeline returns only after all of its parts have finished.






    share|improve this answer























    • how is this relevant to the question…?

      – lensovet
      Nov 15 '16 at 7:45











    • @lensovet If there seems not to be way to solve the problem in the requested way (i.e. aborting the search) then a hint how to (at least partly) avoid the problem seems quite useful to me.

      – Hauke Laging
      Jan 2 '17 at 0:39













    0












    0








    0







    You can have similar problems without tab completion. This does not introduce a technical difference i.e. the same solutions apply.



    One possibility is to start the search in the background and write the result to a FIFO. You can read from the FIFO with a timeout then (read -t 0.3 ...).



    I guess I have seen a simpler solution than FIFOs here recently... but currently I don't remember that. read -t works with a pipeline, too, but the finishing of read does not kill the earlier parts of the pipeline and the pipeline returns only after all of its parts have finished.






    share|improve this answer













    You can have similar problems without tab completion. This does not introduce a technical difference i.e. the same solutions apply.



    One possibility is to start the search in the background and write the result to a FIFO. You can read from the FIFO with a timeout then (read -t 0.3 ...).



    I guess I have seen a simpler solution than FIFOs here recently... but currently I don't remember that. read -t works with a pipeline, too, but the finishing of read does not kill the earlier parts of the pipeline and the pipeline returns only after all of its parts have finished.







    share|improve this answer












    share|improve this answer



    share|improve this answer










    answered Mar 20 '14 at 16:53









    Hauke LagingHauke Laging

    56.5k1285135




    56.5k1285135












    • how is this relevant to the question…?

      – lensovet
      Nov 15 '16 at 7:45











    • @lensovet If there seems not to be way to solve the problem in the requested way (i.e. aborting the search) then a hint how to (at least partly) avoid the problem seems quite useful to me.

      – Hauke Laging
      Jan 2 '17 at 0:39

















    • how is this relevant to the question…?

      – lensovet
      Nov 15 '16 at 7:45











    • @lensovet If there seems not to be way to solve the problem in the requested way (i.e. aborting the search) then a hint how to (at least partly) avoid the problem seems quite useful to me.

      – Hauke Laging
      Jan 2 '17 at 0:39
















    how is this relevant to the question…?

    – lensovet
    Nov 15 '16 at 7:45





    how is this relevant to the question…?

    – lensovet
    Nov 15 '16 at 7:45













    @lensovet If there seems not to be way to solve the problem in the requested way (i.e. aborting the search) then a hint how to (at least partly) avoid the problem seems quite useful to me.

    – Hauke Laging
    Jan 2 '17 at 0:39





    @lensovet If there seems not to be way to solve the problem in the requested way (i.e. aborting the search) then a hint how to (at least partly) avoid the problem seems quite useful to me.

    – Hauke Laging
    Jan 2 '17 at 0:39











    0














    On Ubuntu 16.04 hitting q worked for me.



    See this https://unix.stackexchange.com/a/341025/332159.






    share|improve this answer



























      0














      On Ubuntu 16.04 hitting q worked for me.



      See this https://unix.stackexchange.com/a/341025/332159.






      share|improve this answer

























        0












        0








        0







        On Ubuntu 16.04 hitting q worked for me.



        See this https://unix.stackexchange.com/a/341025/332159.






        share|improve this answer













        On Ubuntu 16.04 hitting q worked for me.



        See this https://unix.stackexchange.com/a/341025/332159.







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Jan 18 at 10:37









        joshjosh

        1011




        1011



























            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%2f120602%2fbash-tab-completion-stop-searching%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?

            Displaying single band from multi-band raster using QGIS

            How many registers does an x86_64 CPU actually have?