Cursor positioning using mouse in bash possible?












1















In Vim I can actually position the cursor in insert-mode using the mouse. So I assume this should (technically) also be enable-able for the bash. Is it possible? This would be quite useful at times when small changes have to be made to very long commands.



(I am using fish actually, but I guess referring to bash I reach a wider audience.)










share|improve this question


















  • 2





    A quick solution see here: askubuntu.com/questions/359686/…

    – jmunsch
    Mar 13 '14 at 23:13






  • 1





    From "info readline" character-search Ctrl+] A character is read and point is moved to the next occurrence of that character. character-search-backward Meta+Ctrl+] A character is read and point is moved to the previous occurrence of that character... Also consider Ctrl+a to move to the beginning of line. And Ctrl+e to move to the end of line. Alt+Shift+f to move forward a word and Alt+Shift+b to move back a word.

    – jmunsch
    Mar 14 '14 at 0:24


















1















In Vim I can actually position the cursor in insert-mode using the mouse. So I assume this should (technically) also be enable-able for the bash. Is it possible? This would be quite useful at times when small changes have to be made to very long commands.



(I am using fish actually, but I guess referring to bash I reach a wider audience.)










share|improve this question


















  • 2





    A quick solution see here: askubuntu.com/questions/359686/…

    – jmunsch
    Mar 13 '14 at 23:13






  • 1





    From "info readline" character-search Ctrl+] A character is read and point is moved to the next occurrence of that character. character-search-backward Meta+Ctrl+] A character is read and point is moved to the previous occurrence of that character... Also consider Ctrl+a to move to the beginning of line. And Ctrl+e to move to the end of line. Alt+Shift+f to move forward a word and Alt+Shift+b to move back a word.

    – jmunsch
    Mar 14 '14 at 0:24
















1












1








1








In Vim I can actually position the cursor in insert-mode using the mouse. So I assume this should (technically) also be enable-able for the bash. Is it possible? This would be quite useful at times when small changes have to be made to very long commands.



(I am using fish actually, but I guess referring to bash I reach a wider audience.)










share|improve this question














In Vim I can actually position the cursor in insert-mode using the mouse. So I assume this should (technically) also be enable-able for the bash. Is it possible? This would be quite useful at times when small changes have to be made to very long commands.



(I am using fish actually, but I guess referring to bash I reach a wider audience.)







command-line bash mouse fish






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Mar 13 '14 at 22:41









RaffaelRaffael

1,71051634




1,71051634








  • 2





    A quick solution see here: askubuntu.com/questions/359686/…

    – jmunsch
    Mar 13 '14 at 23:13






  • 1





    From "info readline" character-search Ctrl+] A character is read and point is moved to the next occurrence of that character. character-search-backward Meta+Ctrl+] A character is read and point is moved to the previous occurrence of that character... Also consider Ctrl+a to move to the beginning of line. And Ctrl+e to move to the end of line. Alt+Shift+f to move forward a word and Alt+Shift+b to move back a word.

    – jmunsch
    Mar 14 '14 at 0:24
















  • 2





    A quick solution see here: askubuntu.com/questions/359686/…

    – jmunsch
    Mar 13 '14 at 23:13






  • 1





    From "info readline" character-search Ctrl+] A character is read and point is moved to the next occurrence of that character. character-search-backward Meta+Ctrl+] A character is read and point is moved to the previous occurrence of that character... Also consider Ctrl+a to move to the beginning of line. And Ctrl+e to move to the end of line. Alt+Shift+f to move forward a word and Alt+Shift+b to move back a word.

    – jmunsch
    Mar 14 '14 at 0:24










2




2





A quick solution see here: askubuntu.com/questions/359686/…

– jmunsch
Mar 13 '14 at 23:13





A quick solution see here: askubuntu.com/questions/359686/…

– jmunsch
Mar 13 '14 at 23:13




1




1





From "info readline" character-search Ctrl+] A character is read and point is moved to the next occurrence of that character. character-search-backward Meta+Ctrl+] A character is read and point is moved to the previous occurrence of that character... Also consider Ctrl+a to move to the beginning of line. And Ctrl+e to move to the end of line. Alt+Shift+f to move forward a word and Alt+Shift+b to move back a word.

– jmunsch
Mar 14 '14 at 0:24







From "info readline" character-search Ctrl+] A character is read and point is moved to the next occurrence of that character. character-search-backward Meta+Ctrl+] A character is read and point is moved to the previous occurrence of that character... Also consider Ctrl+a to move to the beginning of line. And Ctrl+e to move to the end of line. Alt+Shift+f to move forward a word and Alt+Shift+b to move back a word.

– jmunsch
Mar 14 '14 at 0:24












1 Answer
1






active

oldest

votes


















0














Does that work ? It should print escaped sequences on your terminal when using the mouse



echo -e "e[?1000;1006;1015h" # Enable tracking


If it works : test my script on github



Details : Read my answer in another post





share








New contributor




tinmarino is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.





















    Your Answer








    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "89"
    };
    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: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    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%2faskubuntu.com%2fquestions%2f433959%2fcursor-positioning-using-mouse-in-bash-possible%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    0














    Does that work ? It should print escaped sequences on your terminal when using the mouse



    echo -e "e[?1000;1006;1015h" # Enable tracking


    If it works : test my script on github



    Details : Read my answer in another post





    share








    New contributor




    tinmarino is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
    Check out our Code of Conduct.

























      0














      Does that work ? It should print escaped sequences on your terminal when using the mouse



      echo -e "e[?1000;1006;1015h" # Enable tracking


      If it works : test my script on github



      Details : Read my answer in another post





      share








      New contributor




      tinmarino is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.























        0












        0








        0







        Does that work ? It should print escaped sequences on your terminal when using the mouse



        echo -e "e[?1000;1006;1015h" # Enable tracking


        If it works : test my script on github



        Details : Read my answer in another post





        share








        New contributor




        tinmarino is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
        Check out our Code of Conduct.










        Does that work ? It should print escaped sequences on your terminal when using the mouse



        echo -e "e[?1000;1006;1015h" # Enable tracking


        If it works : test my script on github



        Details : Read my answer in another post






        share








        New contributor




        tinmarino is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
        Check out our Code of Conduct.








        share


        share






        New contributor




        tinmarino is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
        Check out our Code of Conduct.









        answered 2 mins ago









        tinmarinotinmarino

        1012




        1012




        New contributor




        tinmarino is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
        Check out our Code of Conduct.





        New contributor





        tinmarino is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
        Check out our Code of Conduct.






        tinmarino is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
        Check out our Code of Conduct.






























            draft saved

            draft discarded




















































            Thanks for contributing an answer to Ask Ubuntu!


            • 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%2faskubuntu.com%2fquestions%2f433959%2fcursor-positioning-using-mouse-in-bash-possible%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

            GameSpot

            日野市

            Tu-95轟炸機