Cursor positioning using mouse in bash possible?
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
add a comment |
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
2
A quick solution see here: askubuntu.com/questions/359686/…
– jmunsch
Mar 13 '14 at 23:13
1
From "info readline" character-searchCtrl+]
A character is read and point is moved to the next occurrence of that character. character-search-backwardMeta+Ctrl+]
A character is read and point is moved to the previous occurrence of that character... Also considerCtrl+a
to move to the beginning of line. AndCtrl+e
to move to the end of line.Alt+Shift+f
to move forward a word andAlt+Shift+b
to move back a word.
– jmunsch
Mar 14 '14 at 0:24
add a comment |
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
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
command-line bash mouse fish
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-searchCtrl+]
A character is read and point is moved to the next occurrence of that character. character-search-backwardMeta+Ctrl+]
A character is read and point is moved to the previous occurrence of that character... Also considerCtrl+a
to move to the beginning of line. AndCtrl+e
to move to the end of line.Alt+Shift+f
to move forward a word andAlt+Shift+b
to move back a word.
– jmunsch
Mar 14 '14 at 0:24
add a comment |
2
A quick solution see here: askubuntu.com/questions/359686/…
– jmunsch
Mar 13 '14 at 23:13
1
From "info readline" character-searchCtrl+]
A character is read and point is moved to the next occurrence of that character. character-search-backwardMeta+Ctrl+]
A character is read and point is moved to the previous occurrence of that character... Also considerCtrl+a
to move to the beginning of line. AndCtrl+e
to move to the end of line.Alt+Shift+f
to move forward a word andAlt+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
add a comment |
1 Answer
1
active
oldest
votes
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
New contributor
add a comment |
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
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
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
New contributor
add a comment |
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
New contributor
add a comment |
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
New contributor
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
New contributor
New contributor
answered 2 mins ago
tinmarinotinmarino
1012
1012
New contributor
New contributor
add a comment |
add a comment |
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.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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
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-backwardMeta+Ctrl+]
A character is read and point is moved to the previous occurrence of that character... Also considerCtrl+a
to move to the beginning of line. AndCtrl+e
to move to the end of line.Alt+Shift+f
to move forward a word andAlt+Shift+b
to move back a word.– jmunsch
Mar 14 '14 at 0:24