I tried to define a few PowerShell cmdlets for the lstlisting
environment, but it seems that the -
breaks the definition. So when I try:
\lstdefinelanguage{powershell}{
keywords = {Get-AzureSubscription,Get-Host,anything}
}
only the keyword anything
is detected. Do I have to escape the -
, and how?
Thanks for any help.
Best Answer
As Marijn said in his comment you should add
alsodigit = {-}
in your definition: