I'm using minted for pretty printing console output and have just noticed that double hyphens, i.e. --, for program options are getting turned in en-hyphens, i.e. –. A MWE is:
\documentclass{memoir}
\usepackage{minted}
\usepackage{fontspec}
\defaultfontfeatures{Ligatures=TeX}
\setmonofont{Courier}
\begin{document}
\begin{minted}{bash}
0-1--2---3
\end{minted}
\end{document}
and I see:

rather than what I'd hope for, a number of individual hyphens.
While making the MWE, I've realised that it's probably to do with an interaction with the fontspec option Ligatures=TeX, but I can't find a reliable way to selectively disable the option—I can do it inside XeLaTeX, but not luaLaTeX. Is it best just to ensure the mono font is loaded without Ligatures=TeX?


Ligatures=TeXeverywhere for compatibility. – Sam Mason Jun 17 '15 at 14:00\defaultfontfeatures{}before defining\setmonofont; the fonts already loaded will respect the\defaultfontfeaturesoptions in force at definition time; the optionLigatures=TeXis implicit at startup, with the most recent version offontspec. – egreg Jun 17 '15 at 14:03mintedblocks. Maybe I should just create a version of the mono font with TeX ligatures off and just havemintedspecifically use it? – Sam Mason Jun 17 '15 at 15:09fontspecprovided a hook for the allocated family name after doing\newfontfamily. Unfortunately,fancyvrb(which manages the keyfontfamily) only accepts an explicit family name as value, so a hypotheticalfontfamily=\noligsmonowould issue errors. – egreg Jun 17 '15 at 21:36\newfontfamily\mintedfont{Courier}[NFSSFamily=mintedfamily] \setminted{fontfamily=mintedfamily}– Sam Mason Jun 18 '15 at 09:20