rename '--fetch/build-grammars' flags into '--grammar fetch/build'

The old flags were a bit long. --grammar is also aliased to -g to make
it even easier.
This commit is contained in:
Michael Davis 2022-03-08 00:13:15 -06:00 committed by Blaž Hrastnik
parent 37520f46ae
commit 7044d7d804
8 changed files with 25 additions and 23 deletions

View file

@ -239,12 +239,12 @@ fn build_grammar(grammar: GrammarConfiguration) -> Result<()> {
};
let grammar_dir_entries = grammar_dir.read_dir().with_context(|| {
format!("Failed to read directory {grammar_dir:?}. Did you use 'hx --fetch-grammars'?")
format!("Failed to read directory {grammar_dir:?}. Did you use 'hx --grammar fetch'?")
})?;
if grammar_dir_entries.count() == 0 {
return Err(anyhow!(
"Directory {grammar_dir:?} is empty. Did you use 'hx --fetch-grammars'?"
"Directory {grammar_dir:?} is empty. Did you use 'hx --grammar fetch'?"
));
};