Commits

Georg Brandl  committed d14447e Merge

Merged in jpolley_atlassian/pygments-main (pull request #55)

  • Participants
  • Parent commits b041eac, ae79ad7

Comments (0)

Files changed (2)

File pygments/lexers/shell.py

 
         for match in line_re.finditer(text):
             line = match.group()
-            m = re.match(r'^((?:|sh\S*?|\w+\S+[@:]\S+(?:\s+\S+)?|\[\S+[@:]'
-                         r'[^\n]+\].+)[$#%])(.*\n?)', line)
+            m = re.match(r'^((?:\(\S+\))?(?:|sh\S*?|\w+\S+[@:]\S+(?:\s+\S+)'
+                          r'?|\[\S+[@:][^\n]+\].+)[$#%])(.*\n?)' , line)
             if m:
                 # To support output lexers (say diff output), the output
                 # needs to be broken by prompts whenever the output lexer

File tests/examplefiles/example.sh-session

 root@host:~#
 sh-3.1$ # on hardy
 sh$ # on etch
+(virtualenv-name)user@host:~$ ls -a
+