Skip to content

Commit

Permalink
Fix bug where it wasn't removing the "'"
Browse files Browse the repository at this point in the history
  • Loading branch information
szsiggs committed Dec 6, 2024
1 parent 75ef696 commit 1bd4a2e
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 1bd4a2e

Please sign in to comment.