Skip to content

Commit

Permalink
Variables need to be more explicit
Browse files Browse the repository at this point in the history
So this regular expression needs to pick up the ending curly.
  • Loading branch information
howardabrams committed Jul 5, 2015
1 parent 2245ab3 commit e650702
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion elisp/shell-script-funcs.el
Expand Up @@ -31,7 +31,7 @@
(concat (getenv "HOME") (substring str 1)))

;; Variables can either be simple $BLAH or ${some-larger}...
(let ((s (or (string-match "${\\([^ ]*\\)}" str)
(let ((s (or (string-match "${\\([^ }]*\\)}" str)
(string-match "$\\([A-z_]*\\)" str)))
(e (match-end 0)))
(if (not s) ; No $ matches?
Expand Down

0 comments on commit e650702

Please sign in to comment.