louisdh / openterm

OpenTerm, a sandboxed command line interface for iOS
Other
1.63k stars 249 forks source link

Shell function silently changes directory to ~ #123

Closed alessaba closed 6 years ago

alessaba commented 6 years ago

Steps to reproduce:

  1. Make a script with the shell function. My script had the following content shell("ls -lar")
  2. cd to some directory
  3. Run the script
  4. Run pwd and you'll see we’re back to ~

img_9141

alessaba commented 6 years ago

This is so frustrating. The "bug" script just contains shell("pwd") I tried with 2 shell("pwd") one after the other to see if the dir is changed after a single function call or at the end of the script. It looks like it's at the end of the entire script. img_9163

louisdh commented 6 years ago

Fixed in 7b66f22967ea162bbf3e62dc196724e701d013ae