mirror of
https://github.com/sxyazi/yazi.git
synced 2026-07-25 08:41:05 +00:00
shell setting
This commit is contained in:
parent
82071bd06b
commit
b5e65a8c6c
3 changed files with 4 additions and 1 deletions
|
|
@ -12,6 +12,7 @@ linemode = "none"
|
||||||
show_hidden = false
|
show_hidden = false
|
||||||
show_symlink = true
|
show_symlink = true
|
||||||
scrolloff = 5
|
scrolloff = 5
|
||||||
|
shell = "sh"
|
||||||
|
|
||||||
[preview]
|
[preview]
|
||||||
tab_size = 2
|
tab_size = 2
|
||||||
|
|
|
||||||
|
|
@ -20,6 +20,7 @@ pub struct Manager {
|
||||||
pub show_hidden: bool,
|
pub show_hidden: bool,
|
||||||
pub show_symlink: bool,
|
pub show_symlink: bool,
|
||||||
pub scrolloff: u8,
|
pub scrolloff: u8,
|
||||||
|
pub shell: String,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Default for Manager {
|
impl Default for Manager {
|
||||||
|
|
|
||||||
3
yazi-plugin/src/external/shell.rs
vendored
3
yazi-plugin/src/external/shell.rs
vendored
|
|
@ -2,6 +2,7 @@ use std::{env, ffi::OsString, process::Stdio};
|
||||||
|
|
||||||
use anyhow::Result;
|
use anyhow::Result;
|
||||||
use tokio::process::{Child, Command};
|
use tokio::process::{Child, Command};
|
||||||
|
use yazi_config::MANAGER;
|
||||||
|
|
||||||
pub struct ShellOpt {
|
pub struct ShellOpt {
|
||||||
pub cmd: OsString,
|
pub cmd: OsString,
|
||||||
|
|
@ -33,7 +34,7 @@ pub fn shell(opt: ShellOpt) -> Result<Child> {
|
||||||
|
|
||||||
#[cfg(unix)]
|
#[cfg(unix)]
|
||||||
return Ok(unsafe {
|
return Ok(unsafe {
|
||||||
Command::new("sh")
|
Command::new(&MANAGER.shell)
|
||||||
.env("YAZI_LEVEL", (level + 1).to_string())
|
.env("YAZI_LEVEL", (level + 1).to_string())
|
||||||
.arg("-c")
|
.arg("-c")
|
||||||
.stdin(opt.stdio())
|
.stdin(opt.stdio())
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue