Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

6
  • You can run strace against a given process, and see where the bash process is spending time. Adding echo's to scripts won't show you issues in tab completion. Commented Nov 19, 2016 at 13:36
  • @ThomasDickey I was thinking of the scripts in /usr/share/bash-completion which are run when bash tries to complete something. How would I run strace here though? I can't do strace bash 2>log since that will hang. Ah, I just saw that I can attach strace to an already running process. I'll try that, thanks. Commented Nov 19, 2016 at 14:20
  • That's the -p option of strace. Commented Nov 19, 2016 at 14:22
  • @ThomasDickey yeah, just tried that but it seems to run and exit immediately. How can I keep it running while I test things in the straced bash session? Commented Nov 19, 2016 at 14:22
  • Perhaps you attached to a child process. If you attach to the parent process and use the -f option, that will follow the (new) child processes. Commented Nov 19, 2016 at 14:31