If a command isn't found in the first tripfile, try loading the next tripfile up.
Also print a message to say this is happening:
task foo not found in ~/code/asdf/sdfsadf/tripfile.js
trying next: ~/tripfile.js
Also, stop chdir'ing to the dirname of the tripfile. Always stay in whatever directory the user ran the command from. And, after loading a tripfile and not finding a task, always chdir back to the original directory, in case the failed tripfile did a process.chdir(__dirname) (which should be a good pattern for project-level tripfiles)
Add a note in the docs that the cwd will always be the directory from which you ran the $ trip command, so if you want to change it so your commands are always run from your project root, you can do process.chdir(__dirname) at the top of your tripfile.
If a command isn't found in the first tripfile, try loading the next tripfile up.
Also print a message to say this is happening:
chdir
back to the original directory, in case the failed tripfile did aprocess.chdir(__dirname)
(which should be a good pattern for project-level tripfiles)$ trip
command, so if you want to change it so your commands are always run from your project root, you can doprocess.chdir(__dirname)
at the top of your tripfile.