tartley / rerun

This project is DEPRECATED in favour of https://github.com/tartley/rerun2
Other
18 stars 4 forks source link

Should use users current (or default?) shell #7

Closed tartley closed 10 years ago

tartley commented 10 years ago

Doing rerun on shell aliases or functions fails:

$ rerun glog
/bin/sh: 1: glog: not found

This is because rerun runs the given command using subprocess, which defaults to running it under /bin/sh.

Instead rerun should pass 'executable=' to subprocess.call() or Popen.

User's current shell is available at the command prompt as $0, but I'm not sure how rerun, as a child processes can access that. Perhaps we should use the user's default shell instead?

tartley commented 10 years ago

Fixed, with thanks to http://stackoverflow.com/questions/25099895/from-python-start-a-shell-that-can-interpret-functions-and-aliases