Files
topgrade/src/steps/kakoune.rs
Florian Nagel 29c555c394 Add i18n by using rust i18n (#807)
* feat: initial i18n setup

* style: fmt

* feat: i18n support for new steps

* fix: build on Linux

* fix: build on Linux

* refactor: rm unused translation keys

---------

Co-authored-by: Steve Lau <stevelauc@outlook.com>
2024-10-03 18:47:35 +08:00

25 lines
569 B
Rust

use crate::terminal::print_separator;
use crate::utils::require;
use color_eyre::eyre::Result;
use rust_i18n::t;
use crate::execution_context::ExecutionContext;
const UPGRADE_KAK: &str = include_str!("upgrade.kak");
pub fn upgrade_kak_plug(ctx: &ExecutionContext) -> Result<()> {
let kak = require("kak")?;
print_separator("Kakoune");
// TODO: Why supress output for this command?
ctx.run_type()
.execute(kak)
.args(["-ui", "dummy", "-e", UPGRADE_KAK])
.output()?;
println!("{}", t!("Plugins upgraded"));
Ok(())
}