From owner-freebsd-questions@FreeBSD.ORG Mon Jan 29 22:37:31 2007 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id D5BD416A400 for ; Mon, 29 Jan 2007 22:37:31 +0000 (UTC) (envelope-from benfell@earth.parts-unknown.org) Received: from earth.parts-unknown.org (earth.parts-unknown.org [66.93.170.243]) by mx1.freebsd.org (Postfix) with SMTP id 971FF13C46B for ; Mon, 29 Jan 2007 22:37:31 +0000 (UTC) (envelope-from benfell@earth.parts-unknown.org) Received: (qmail 29058 invoked by uid 501); 29 Jan 2007 22:37:31 -0000 Date: Mon, 29 Jan 2007 14:37:31 -0800 From: David Benfell To: freebsd-questions@freebsd.org Message-ID: <20070129223730.GA7986@parts-unknown.org> Mail-Followup-To: freebsd-questions@freebsd.org MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="d6Gm4EdcadzBjdND" Content-Disposition: inline X-gnupg-public-key: http://www.parts-unknown.org/gnupg/export-0DD1D1E3 X-stardate: [-29]7064.52 X-moon: The Moon is Waxing Gibbous (89% of Full) User-Agent: Mutt/1.5.13 (2006-08-11) Subject: stupid scripting question: zsh X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Jan 2007 22:37:31 -0000 --d6Gm4EdcadzBjdND Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hello all, I've been upgrading my FreeBSD system into a fully-fledged desktop system. zsh as installed (from the port) seems only to recognize the /etc/zshenv startup file. And I needed an stty command to get proper backspace/delete behavior. Because only the /etc/zshenv file seemed to be recognized, I had to put the stty command in it. The stty command works fine, but unsurprisingly produces an error in my automated jobs that ssh into the system. So I tried: if [ ${TERM} ] then stty erase "^?" fi That didn't work, so I tried: if [ -n ${TERM} ] then stty erase "^?" fi Someone who actually knows what they're doing will, I'm sure, instantly recognize the problem with this. I'm pretty sure TERM is indeed the variable I should be testing, but that I'm not testing it in the right =20 way. What is the magic way? --=20 David Benfell, LCP benfell@parts-unknown.org --- Resume available at http://www.parts-unknown.org/ NOTE: I sign all messages with GnuPG (0DD1D1E3). --d6Gm4EdcadzBjdND Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (FreeBSD) iD8DBQFFvncqUd+dMw3R0eMRAjtzAJ4mDrKbVLBdIBw7X5OrPdbenk93+ACgqHnW 4I6RkPYz90tWEuGB5hcaFPk= =fICz -----END PGP SIGNATURE----- --d6Gm4EdcadzBjdND--