for the literal \fB\-foo\fP: .sp .EX rg \-e \-foo .EE .sp You can also use the special \fB\-\-\fP delimiter to indicate that no more flags will be provided. Namely, the following is equivalent to the above: .sp .EX rg \-\- \-foo .EE .sp When \flag{file} or \flag{regexp} is used, then ripgrep treats all positional arguments as files or directories to search.