Bash tab completion stop searching
Clash Royale CLAN TAG#URR8PPP
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
add a comment |
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
You might want to take a look into this. ubuntuforums.org/showthread.php?t=1865538
– Ramesh
Mar 20 '14 at 14:42
add a comment |
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
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
bash autocomplete
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
add a comment |
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
add a comment |
3 Answers
3
active
oldest
votes
I just found this here.
Use Ctrl+
. It will stop the completion and go back to your command line without loosing the current command.
Unfortunately this didn't work for me on Ubuntu
– josh
Jan 18 at 10:09
add a comment |
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.
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
add a comment |
On Ubuntu 16.04 hitting q
worked for me.
See this https://unix.stackexchange.com/a/341025/332159.
add a comment |
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
);
);
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%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
I just found this here.
Use Ctrl+
. It will stop the completion and go back to your command line without loosing the current command.
Unfortunately this didn't work for me on Ubuntu
– josh
Jan 18 at 10:09
add a comment |
I just found this here.
Use Ctrl+
. It will stop the completion and go back to your command line without loosing the current command.
Unfortunately this didn't work for me on Ubuntu
– josh
Jan 18 at 10:09
add a comment |
I just found this here.
Use Ctrl+
. It will stop the completion and go back to your command line without loosing the current command.
I just found this here.
Use Ctrl+
. It will stop the completion and go back to your command line without loosing the current command.
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
add a comment |
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
add a comment |
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.
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
add a comment |
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.
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
add a comment |
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.
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.
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
add a comment |
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
add a comment |
On Ubuntu 16.04 hitting q
worked for me.
See this https://unix.stackexchange.com/a/341025/332159.
add a comment |
On Ubuntu 16.04 hitting q
worked for me.
See this https://unix.stackexchange.com/a/341025/332159.
add a comment |
On Ubuntu 16.04 hitting q
worked for me.
See this https://unix.stackexchange.com/a/341025/332159.
On Ubuntu 16.04 hitting q
worked for me.
See this https://unix.stackexchange.com/a/341025/332159.
answered Jan 18 at 10:37
joshjosh
1011
1011
add a comment |
add a comment |
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.
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%2funix.stackexchange.com%2fquestions%2f120602%2fbash-tab-completion-stop-searching%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
You might want to take a look into this. ubuntuforums.org/showthread.php?t=1865538
– Ramesh
Mar 20 '14 at 14:42