Talk:Terminal control/Unicode output: Difference between revisions

→‎Er, "Terminal supports"?: set -- marks end of options.
(→‎Er, "Terminal supports"?: set -- marks end of options.)
Line 29:
 
My books are based on System V, and they do not mention it, so it is probably an undocumented feature. There are some compatible shells, where the set -- does not work either. I stumbled across some notes somewhere, which talks about the implementation of the set command, and how the behaviour of the doublehypen is inconsistent when given as a parameter to set. I can't remember where I saw it at the moment though, I think it might have been an awk book, or a korn shell book, rather than a System V book. I am looking into it. [[User:Markhobley|Markhobley]] 19:25, 12 September 2011 (UTC)
 
: The hyphens with <code>set --</code> are marking end of options, like <code>ls --</code> or <code>rm --</code>. So <code>set -x</code> turns on trace mode, but <code>set -- -x</code> assigns parameter $1. I have used <code>set --</code> around the wiki ([[Factorial#UNIX Shell]], [[Greatest common divisor#UNIX Shell]]). It would be interesting to try a shell where <code>set --</code> does not work. --[[User:Kernigh|Kernigh]] 15:06, 13 September 2011 (UTC)
 
==Locales and terminal capabilities==
Anonymous user