Timeline for How to set an alias on a per-directory basis?
Current License: CC BY-SA 3.0
3 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Oct 27, 2012 at 5:17 | comment | added | Emanuel Berg |
What I can see, you have two options, either use one function (like @Bernhard described above), and branch depending on directory (just like he said), or, you could put the parameters in the directories. Come to think of it, it doesn't have to be scripts, you could just put a file (touch .TESTNO; echo 2 > .TESTNO ) in each directory, and then, in your function, look for that file, and branch according to what test number the .TESTNO file contains. Although not at all difficult, you probably cannot use an alias for this; you must use a function.
|
|
Oct 27, 2012 at 3:11 | comment | added | B Seven | That's a lot of work...here's the use case: When running tests, I want to alias rspec-all to run certain tests. But which tests depends on the project. And that is determined by the directory. | |
Oct 27, 2012 at 0:17 | history | answered | Emanuel Berg | CC BY-SA 3.0 |