bash-preexec: `preexec` doesn't work for function declarations

$ source .bash-preexec.sh
$ preexec() { echo "just typed $1"; }
$ date
just typed date
Wed Jun 17 16:20:15 UTC 2015
$ function foo() { echo foo; }
$ foo
just typed foo
foo
$ (date)
Wed Jun 24 02:42:48 UTC 2015

About this issue

  • Original URL
  • State: open
  • Created 9 years ago
  • Comments: 34 (29 by maintainers)

Commits related to this issue

Most upvoted comments

bash-preexec shouldn’t change that aspect of your HISTCONTROL. It will alter it to not ignore whitespace. Ignoredups or ignoreboth were probably set by something else, but if I’m mistaken please let me know 😃