Skip to content

Commit

Permalink
try a bit less hard to parse input as a url
Browse files Browse the repository at this point in the history
  • Loading branch information
doy committed Jun 20, 2024
1 parent 0d393e4 commit bd2c93e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/bin/rbw/commands.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,9 @@ pub fn parse_needle(arg: &str) -> Result<Needle, std::convert::Infallible> {
return Ok(Needle::Uuid(uuid));
}
if let Ok(url) = Url::parse(arg) {
return Ok(Needle::Uri(url));
if url.is_special() {
return Ok(Needle::Uri(url));
}
}

Ok(Needle::Name(arg.to_string()))
Expand Down

0 comments on commit bd2c93e

Please sign in to comment.