Move command help files into `runtime/help/commands/`

pull/997/head
Omnikar 3 years ago
parent e1283fc41c
commit de6fb00ea0
No known key found for this signature in database
GPG Key ID: 7DE6694CDA7885ED

@ -2667,8 +2667,7 @@ pub mod cmd {
} }
}; };
let mut path = helix_core::runtime_dir(); let mut path = helix_core::runtime_dir().join("help/commands");
path.push("help");
path.push(format!("{}.txt", command)); path.push(format!("{}.txt", command));
ensure!(path.is_file(), "No help available for '{}'", args.join(" ")); ensure!(path.is_file(), "No help available for '{}'", args.join(" "));

@ -233,7 +233,7 @@ pub mod completers {
} }
pub fn help(input: &str) -> Vec<Completion> { pub fn help(input: &str) -> Vec<Completion> {
let path = helix_core::runtime_dir().join("help"); let path = helix_core::runtime_dir().join("help/commands");
let commands: Vec<String> = std::fs::read_dir(path) let commands: Vec<String> = std::fs::read_dir(path)
.map(|entries| { .map(|entries| {
entries entries

Loading…
Cancel
Save