[anyterm] Fix regexp match.

abo abo at fedoraproject.org
Fri Jun 1 22:18:38 UTC 2012


commit ecfcfd777654ce6194b332407a49fae2f6d332f3
Author: Alexander Boström <abo at root.snowtree.se>
Date:   Tue May 22 12:23:16 2012 +0200

    Fix regexp match.

 anyterm-cmd |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/anyterm-cmd b/anyterm-cmd
index 751624f..248acec 100644
--- a/anyterm-cmd
+++ b/anyterm-cmd
@@ -8,7 +8,7 @@ while : ; do
     read U
     # Make sure it does not start with a "-" and only contains valid
     # username characters.
-    if [[ "$U" =~ "^[A-Za-z0-9_][A-Za-z0-9_-]*\$" ]]; then
+    if [[ "$U" =~ ^[A-Za-z0-9_][A-Za-z0-9_-]*$ ]]; then
       ssh "$U at localhost"
     else
       echo "Bad username."


More information about the scm-commits mailing list