Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • B bashhub-client
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 22
    • Issues 22
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 1
    • Merge requests 1
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Ryan Caloras
  • bashhub-client
  • Issues
  • #29
Closed
Open
Issue created May 17, 2016 by Ryan Caloras@rcalorasOwner

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.

Assignee
Assign to
Time tracking