in reply to How to know the status of a command invoked by open function?

This in no way answers your question, but for alternates to ls, consider:
  • Comment on Re: How to know the status of a command invoked by open function?