Revert "fix a bug that shell expansions will run twice"

This reverts commit 2c4e2fe4a8436a9d4e5c942d34a990cb1dbedb6a.