Skip to content

Commit

Permalink
updated to accomodate for illegal characters in tab name
Browse files Browse the repository at this point in the history
  • Loading branch information
KCaverly committed Mar 24, 2023
1 parent d37ba16 commit 26adf5f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/dirs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -62,15 +62,15 @@ impl DirsCommand {

pub fn post_search_command(cfg: &Config, selected: &str) {
let details = Self::get_directory_details(cfg, selected);
let name = selected.split("/").last().unwrap();
let name = selected.split("/").last().unwrap().replace(".", "_");

TMUX::create_window(&details.session_name, name);
TMUX::create_window(&details.session_name, &name);
TMUX::send_keys(
&details.session_name,
name,
&name,
&format!("cd {selected} && clear"),
);
TMUX::attach_or_select_window(&details.session_name, name);
TMUX::attach_or_select_window(&details.session_name, &name);
}

pub fn run(cfg: &Config) {
Expand Down

0 comments on commit 26adf5f

Please sign in to comment.