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_symlink = true
|
||||
scrolloff = 5
|
||||
shell = "sh"
|
||||
|
||||
[preview]
|
||||
tab_size = 2
|
||||
|
|
|
|||
|
|
@ -20,6 +20,7 @@ pub struct Manager {
|
|||
pub show_hidden: bool,
|
||||
pub show_symlink: bool,
|
||||
pub scrolloff: u8,
|
||||
pub shell: String,
|
||||
}
|
||||
|
||||
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 tokio::process::{Child, Command};
|
||||
use yazi_config::MANAGER;
|
||||
|
||||
pub struct ShellOpt {
|
||||
pub cmd: OsString,
|
||||
|
|
@ -33,7 +34,7 @@ pub fn shell(opt: ShellOpt) -> Result<Child> {
|
|||
|
||||
#[cfg(unix)]
|
||||
return Ok(unsafe {
|
||||
Command::new("sh")
|
||||
Command::new(&MANAGER.shell)
|
||||
.env("YAZI_LEVEL", (level + 1).to_string())
|
||||
.arg("-c")
|
||||
.stdin(opt.stdio())
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue