Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

For example, 'foo bar' would be quoted as `foo bar', or ``foo bar''. Is it encouraged or general practice to use this quoting syntax?

share|improve this question
3  
In what context? In Unix&Linux context, that question doesn't make much sense. If it's an English question, it's not the best place to ask. –  Stephane Chazelas Mar 17 '13 at 21:57
    
Where? Do you mean in documentation? That depends on the conventions of each particular document. –  Gilles Mar 17 '13 at 22:00
    
It's not an english question - I see this only in plain text mediums, eg ttys and txt documents. If it weren't in that scenario, then the font would change the quote parentheses to opening and closing quotes, like `` and `` (mirrorred) –  Marco Scannadinari Mar 17 '13 at 22:01
2  
@Gilles, that also depends on the language and locale setting. For instance, GNU documentations tend to use `...' in English locales, « ... » in French locales. I suppose they respect the typographical convention of every language. –  Stephane Chazelas Mar 17 '13 at 22:06
add comment

3 Answers

up vote 4 down vote accepted

Please, no. WRT regular text: single quotes, fine. Double quotes, okay. Backticks are only used literally (eg, as they are with the shell) and not as quotes. There are also the extended charset characters “ (left double quote) and ” (right double quote), but since they are not on a normal keyboard, the " is usually used in place of both of them. There's also a right single quote and left single quote, but since they're not on the keyboard either the apostrophe ' usually stands in for them.

In the context of programming (including shell scripting), what quotes mean varies from language to language, none of which are specific to linux. Programming languages AFAIK restrict themselves to the ASCII character set, so the plain " and apostrophe ' for the single quote.

I have seen documentation here and there that does the kind of thing you are talking about. IMO it's ugly and ridiculous, but to each their own. It certainly does does not indicate anything beyond clumsiness, and even more certainly does not mean anything in a programming or shell context (other than "syntax error").

share|improve this answer
    
I thought the same thing myself, great answer. –  Marco Scannadinari Mar 17 '13 at 22:16
2  
What's a “normal” (or is it ‘normal’ or „normal“ or « normal », or ‟normal” ☺) keyboard? –  Stephane Chazelas Mar 17 '13 at 22:31
3  
It probably comes from TeX, where you quote things that way because you need to distinguish between opening and closing quotes –  Michael Mrozek Mar 17 '13 at 22:35
add comment

This is e.g. LaTeX usage to represent left and right double quotes (or left and right single quotes). Take a look at any well-printed book, and you'll see them used everywhere. The barbarous computer keyboards don't have these characters.

share|improve this answer
add comment

This just depends on the convention in use. One widely used convention in README files is Markdown (just like here), and it uses `…` to literally quote.

I guess you referred to the program source comments context. If so, unfortunately, there is no well established standard in this area (although Markdown is a good candidate), thus the same for the way to quote a literal command or identifier.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.