{"action":"opened","issue":{"url":"https://api.github.com/repos/BobBuildTool/bob/issues/37","repository_url":"https://api.github.com/repos/BobBuildTool/bob","labels_url":"https://api.github.com/repos/BobBuildTool/bob/issues/37/labels{/name}","comments_url":"https://api.github.com/repos/BobBuildTool/bob/issues/37/comments","events_url":"https://api.github.com/repos/BobBuildTool/bob/issues/37/events","html_url":"https://github.com/BobBuildTool/bob/issues/37","id":181223950,"number":37,"title":"RFD: make shell easier to use","user":{"login":"stefanreuther","id":16349671,"avatar_url":"https://avatars.githubusercontent.com/u/16349671?v=3","gravatar_id":"","url":"https://api.github.com/users/stefanreuther","html_url":"https://github.com/stefanreuther","followers_url":"https://api.github.com/users/stefanreuther/followers","following_url":"https://api.github.com/users/stefanreuther/following{/other_user}","gists_url":"https://api.github.com/users/stefanreuther/gists{/gist_id}","starred_url":"https://api.github.com/users/stefanreuther/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stefanreuther/subscriptions","organizations_url":"https://api.github.com/users/stefanreuther/orgs","repos_url":"https://api.github.com/users/stefanreuther/repos","events_url":"https://api.github.com/users/stefanreuther/events{/privacy}","received_events_url":"https://api.github.com/users/stefanreuther/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-10-05T17:58:50Z","updated_at":"2016-10-05T17:58:50Z","closed_at":null,"body":"**What I want to do:** for debugging a build, I'd like to execute commands in the workspace. Could be `gdb`. Could be `make test`. Could be `make myfile.i`. Could be `./configure`. Right now, I have to figure out the workspace directory, and do something like `build.sh shell`. However, even if I do that, I'm still missing shell functions and most variables I defined in my recipes. Wouldn't it be nice to have a command like `bob shell <mypackage>`?\r\n\r\n**Idea:** I made a prototype of a `bob shell` command (in perl, sorry; see attached file). Right now, this parses the `script` that bob places in each directory using some ad-hockery, and generates a new rcfile, which it then gives to an interactive bash. This shell has environment variables set and functions defined (the `script` is parsed up to the first line my ad-hoc parser does not understand, which is usually a command invocation).\r\n\r\n**How could we do this in bob directly?** porting the perl to python would be trivial. A much better solution, however, would be to allow users to split setup and execution of a step. Instead of, say, buildScript, you specify buildSetup + buildScript. For building, both are concatenated to produce the same result as now. For the shell, just execute the buildSetup parts.\r\n\r\n[bob-shell.txt](https://github.com/BobBuildTool/bob/files/511927/bob-shell.txt)\r\n"}}
{"actor":{"display_login":"stefanreuther"}}