commit c1c59e0798c0505a74b768237bfccab3ecf4ab8e parent 5f4025d141b3d542904898fd2259be753999e9c7 Author: Anders Damsgaard <anders@adamsgaard.dk> Date: Tue, 26 Feb 2019 09:19:52 +0100 Allow hyphens in urls Diffstat:
M | links/bin/ducksearch | | | 2 | +- |
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/links/bin/ducksearch b/links/bin/ducksearch @@ -12,7 +12,7 @@ if [ "$choice" = "🦆" ]; then $browser "https://duckduckgo.com" else # Detect if url - if [[ "$choice" =~ ^(http:\/\/|https:\/\/)?[a-zA-Z0-9]+\.[a-zA-Z]+(/)?.*$ ]]; then + if [[ "$choice" =~ ^(http:\/\/|https:\/\/)?[a-zA-Z0-9\-]+\.[a-zA-Z]+(/)?.*$ ]]; then $browser "$choice" else $browser "https://duckduckgo.com/?q=$choice&t=ffab&atb=v1-1"