From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4161 invoked by alias); 2 Jan 2015 01:21:30 -0000 Mailing-List: contact zsh-users-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Users List List-Post: List-Help: X-Seq: 19650 Received: (qmail 22712 invoked from network); 2 Jan 2015 01:21:16 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,HTML_MESSAGE, RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.2 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=CYBCoa8W15LTJBzfdzWWao8LIT7CzCerICKu4ocnybU=; b=UPrAs2MnRv11KCJq1mjV+qkLSfdUxzi6Nu3xoliE9Rv60RF+RoJJrMElkzbJJ5ZGzs q89/018gkDTAL5vzy4xZoFPvYUEiRTrmdWR0o6RY4jggC23i87omzoanYLh+EnOT7jcN 17vYItB4Hifz7lecTAuIJCTj8AC3TH7HOhQL5CoATM8M3CTrYbC3UzRdbWef1hvmqMN6 We/lJuVflH1jpl5lwuZEOY7eq0hvml91j9dMuiGdOVjU57JXpbXBtzCJ+bX2bp7HsD0a WXVLN9sImda7Xd0xJ7s2GSbLYuH3BZRmR04qJNIyocSK9oKxDrmKtmdLoPWxDuqviFxC N4uA== X-Gm-Message-State: ALoCoQm1Ow2Uu8RN8Q1bY7TUWGauF/yIAsu62DbzTaeBdA1JmHnZUbipjC0mKFEREw8LAvvAJgSQ MIME-Version: 1.0 X-Received: by 10.112.25.7 with SMTP id y7mr194947lbf.94.1420161670408; Thu, 01 Jan 2015 17:21:10 -0800 (PST) In-Reply-To: <54A5D21F.1090701@eastlink.ca> References: <54A4DF80.7040206@eastlink.ca> <141231223506.ZM26289@torch.brasslantern.com> <54A59EE5.7000601@eastlink.ca> <150101132931.ZM27115@torch.brasslantern.com> <54A5D21F.1090701@eastlink.ca> Date: Thu, 1 Jan 2015 17:21:10 -0800 Message-ID: Subject: Re: print color escapes From: Kurtis Rader To: Ray Andrews Cc: Zsh Users Content-Type: multipart/alternative; boundary=001a11c3f1a6e381dc050ba1272a --001a11c3f1a6e381dc050ba1272a Content-Type: text/plain; charset=UTF-8 On Thu, Jan 1, 2015 at 3:02 PM, Ray Andrews wrote: But terminal will always grab ESC 'hard' will it not? That is to say that no matter how you dress it up, the terminal always sees it verbatim. And I'd expect that that convention is now written in stone. The terminal always sees every character verbatim. How it treats the character depends on many things. In the past (circa the 1980s) you could purchase "smart" terminals from different companies each of which implemented their own "language". Language in this context means the specific mapping of character sequences to actions such as clearing the screen or changing the foreground color. The reason the terminfo and termcap databases and associated programming APIs exist (try typing "man terminfo" or "man tercap" at your shell prompt) was to make it possible for programs to perform actions like moving the cursor to a specific location on the screen without explicitly knowing which control language the terminal implemented. One of those was the DEC VT100. The "language" it recognized eventually became the winner. Winner in the sense that by the 1990s nearly all terminals implemented that language. That de-facto standard was eventually turned into standard ANSI X3.64 which is now pretty much the only terminal control language you'll find in use. P.S., Yes, I've glossed over many important details above. Such as the fact the DEC VT52 was actually the first terminal to implement what would eventually become the ANSI X3.64 standard. But it was the VT100 that made that transition all but inevitable. Today things are even more complicated by Unicode and encodings such as UTF-8 which a terminal should understand in order to translate multi-byte characters into the appropriate human language glyph. -- Kurtis Rader Caretaker of the exceptional canines Junior and Hank --001a11c3f1a6e381dc050ba1272a--