Skip to content

Commit

Permalink
Fix bug where it wasn't removing the "'" (#138)
Browse files Browse the repository at this point in the history
Co-authored-by: szsiggs <[email protected]>
  • Loading branch information
TheSiggs and szsiggs authored Dec 6, 2024
1 parent 75ef696 commit 164c609
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/tmux.rs
Original file line number Diff line number Diff line change
Expand Up @@ -115,9 +115,11 @@ impl Tmux {

// If the session already exists switch to it, else create the new session and then switch
sessions.lines().any(|line| {
let mut cleaned_line = line.to_owned();
// tmux will return the output with extra ' and \n characters
line.to_owned().retain(|char| char != '\'' && char != '\n');
line == repo_short_name
cleaned_line.retain(|char| char != '\'' && char != '\n');

cleaned_line == repo_short_name
})
}

Expand Down

0 comments on commit 164c609

Please sign in to comment.