diff --git a/cmd/jsonnet.cpp b/cmd/jsonnet.cpp index 9dfb0fd76..51c2255f3 100644 --- a/cmd/jsonnet.cpp +++ b/cmd/jsonnet.cpp @@ -91,15 +91,15 @@ void usage(std::ostream &o) o << "Available options for specifying values of 'external' variables:\n"; o << "Provide the value as a string:\n"; o << " -V / --ext-str [=] If is omitted, get from environment var \n"; - o << " -f / --ext-str-file = Read the string from the file\n"; + o << " --ext-str-file = Read the string from the file\n"; o << "Provide a value as Jsonnet code:\n"; o << " --ext-code [=] If is omitted, get from environment var \n"; o << " --ext-code-file = Read the code from the file\n"; o << "\n"; o << "Available options for specifying values of 'top-level arguments':\n"; o << "Provide the value as a string:\n"; - o << " -V / --tla-str [=] If is omitted, get from environment var \n"; - o << " -f / --tla-str-file = Read the string from the file\n"; + o << " -A / --tla-str [=] If is omitted, get from environment var \n"; + o << " --tla-str-file = Read the string from the file\n"; o << "Provide a value as Jsonnet code:\n"; o << " --tla-code [=] If is omitted, get from environment var \n"; o << " --tla-code-file = Read the code from the file\n"; @@ -270,27 +270,32 @@ static bool process_args(int argc, dir += '/'; } jsonnet_jpath_add(vm, dir.c_str()); - } else if (arg == "-V" || arg == "--ext-str") { + // TODO(dcunnin): Remove deprecated --var, --env and -E + } else if (arg == "-V" || arg == "--ext-str" + || arg == "--var" || arg == "--env" || arg == "-E") { std::string var, val; if (!get_var_val(next_arg(i, args), var, val)) return EXIT_FAILURE; jsonnet_ext_var(vm, var.c_str(), val.c_str()); - } else if (arg == "-F" || arg == "--ext-str-file") { + // TODO(dcunnin): Remove deprecated --file and -F + } else if (arg == "--ext-str-file" || arg == "--file" || arg == "-F") { std::string var, val; if (!get_var_file(next_arg(i, args), var, val)) return EXIT_FAILURE; jsonnet_ext_var(vm, var.c_str(), val.c_str()); - } else if (arg == "--ext-code") { + // TODO(dcunnin): Remove deprecated --code-var, --code-env + } else if (arg == "--ext-code" || arg == "--code-var" || arg == "--code-env") { std::string var, val; if (!get_var_val(next_arg(i, args), var, val)) return EXIT_FAILURE; jsonnet_ext_code(vm, var.c_str(), val.c_str()); - } else if (arg == "--ext-code-file") { + // TODO(dcunnin): Remove deprecated --code-file + } else if (arg == "--ext-code-file" || arg == "--code-file") { std::string var, val; if (!get_var_file(next_arg(i, args), var, val)) return EXIT_FAILURE; jsonnet_ext_code(vm, var.c_str(), val.c_str()); - } else if (arg == "--tla-str") { + } else if (arg == "-A" || arg == "--tla-str") { std::string var, val; if (!get_var_val(next_arg(i, args), var, val)) return EXIT_FAILURE;