From 0b12b2bae1130746ed49cc3c7a2daa819ede1b58 Mon Sep 17 00:00:00 2001 From: Teddy Wing Date: Sat, 23 Apr 2016 02:18:14 -0400 Subject: Specify alias file as a command line argument * Add a dependency on 'getopts' * Remove the hard-coded "testaliases" file used previously. * write_alias: Update to include a `file` attribute that can reference an arbitrary file * find_alias_in_file: Change the `file` parameter to be a Path reference instead of a string so that it can be called correctly from `write_alias`. Also because it matches the File module's signature. Originally I planned to make the file argument available under a `-f` command-line option. Later I decided instead to make it a required argument, so it made more sense not to prefix it with an option flag. Since I no longer need command line options—just the first argument—I realised that I could get rid of the `getopts` dependency and use `std::env::args`. Will do this in a later commit. --- Cargo.lock | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'Cargo.lock') diff --git a/Cargo.lock b/Cargo.lock index 81030eb..8db7560 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1,4 +1,12 @@ [root] name = "alias-auto-add" version = "0.0.1" +dependencies = [ + "getopts 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)", +] + +[[package]] +name = "getopts" +version = "0.2.14" +source = "registry+https://github.com/rust-lang/crates.io-index" -- cgit v1.2.3