Order of precmd functions cause an issue when running commands with input
Running a command which opened its own shell, like mongo
resulted in a fork and failed.
elementz@Kashmir:~/git/bashhub-client (1.0.3-dev)$ bh -i
(bashhub-i-search): mongo
mongo
MongoDB shell version: 2.6.12
connecting to: test
[3]+ Stopped mongo
Looks like an issue with the forking of __bh_precmd: https://github.com/rcaloras/bashhub-client/blob/master/bashhub/shell/deps/lib-bashhub.sh#L67
(__bh_process_command "$command"&) >> "$bashhub_dir"/log.txt 2>&1
Believe we can work around this by just placing __bh_bash_precmd prior to __bh_precmd. Currently it's
echo ${precmd_functions[@]}
__bh_precmd_run_script __bh_precmd __bh_bash_precmd precmd
Putting together a fix on 1.0.3-dev.