command-not-found handler is invoked from sourced scripts
Bug #559060 reported by
Tom Womack
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Gnu Bash |
Invalid
|
Undecided
|
Unassigned | ||
command-not-found |
Won't Fix
|
Medium
|
Dominique Ramaekers |
Bug Description
I have a program progress.sh which produces an output progress.txt, and seem to type '. progress.txt' rather than '. progress.sh' about once a day.
'. progress.txt' ends up invoking command-not-found several hundred times, and so you have to hold down ctrl-C for some seconds to stop it; would it be possible for command-not-found to be a quick no-op if it's been run more than five times in the last five seconds?
(for a test case, do 'primes 100 1000 > P' then '. P', and try to stop the output with ctrl-C)
Changed in command-not-found: | |
assignee: | nobody → Dadio (dominique-ramaekers) |
Changed in command-not-found: | |
status: | Confirmed → In Progress |
To post a comment you must log in.
Interesting, it seems that using . (aka source) in interactive scripts still triggers c-n-f handler! I think this is a bug in bash to be honest, it should not work like that.