diff options
author | qkzk <qu3nt1n@gmail.com> | 2023-03-29 23:26:35 +0200 |
---|---|---|
committer | qkzk <qu3nt1n@gmail.com> | 2023-03-29 23:26:35 +0200 |
commit | f55d5e85d139ee455932f54403eb646dd614e5fa (patch) | |
tree | 3e6d88db8d4697fc363e52d6b61a4d78bb707c24 /src/event_exec.rs | |
parent | db6203086f5ac5654f3a4cd8f53ee88b8174213d (diff) |
key ` goes to root
Diffstat (limited to 'src/event_exec.rs')
-rw-r--r-- | src/event_exec.rs | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/event_exec.rs b/src/event_exec.rs index 47609ed..d778362 100644 --- a/src/event_exec.rs +++ b/src/event_exec.rs @@ -950,9 +950,12 @@ impl EventExec { let home_cow = shellexpand::tilde("~"); let home: &str = home_cow.borrow(); let path = std::fs::canonicalize(home)?; - tab.set_pathcontent(&path)?; + tab.set_pathcontent(&path) + } - Ok(()) + pub fn event_go_root(tab: &mut Tab) -> Result<()> { + let root_path = std::path::PathBuf::from("/"); + tab.set_pathcontent(&root_path) } fn read_nvim_listen_address_if_needed(status: &mut Status) { |