From owner-freebsd-questions@freebsd.org Sat Mar 30 11:36:37 2019 Return-Path: Delivered-To: freebsd-questions@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D094E1570987 for ; Sat, 30 Mar 2019 11:36:36 +0000 (UTC) (envelope-from carmel_ny@outlook.com) Received: from NAM05-DM3-obe.outbound.protection.outlook.com (mail-oln040092014094.outbound.protection.outlook.com [40.92.14.94]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (Client CN "mail.protection.outlook.com", Issuer "GlobalSign Organization Validation CA - SHA256 - G3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 0D47784082 for ; Sat, 30 Mar 2019 11:36:34 +0000 (UTC) (envelope-from carmel_ny@outlook.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outlook.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=MC47fMVY0liaffL9h3AKOYfm5OQ5k8Bb+z9SItfwJgQ=; b=eg4E4LCVJEOJY4tbhkze7j80q58Vg0GC+Bry8UhcmpYJPZ1CxIm2ZW50qshwPcG58GIrILDarLwVCmTngaz55MpTTjJAztlr8grkwFxx4ee6YbTTdzI7TL0Hta489D08BJ/PAXtGyFivKUA5TJvaE8OFSQK+m17+viSZsy6bQvW69k1K/S5LZEtNgnJi9OPG/WWw0+HlfpnfpjxSwLCKCVL4bL/PtikozjcuQF3AmeREMjw0RflRwHE7pVwUFUpSliyN1qyVsAMntmSivD3qvDyhrGQm4nPsrHorMiestOBQpmYKggW/CMggmikDtoEe2RLiqzKpQbt93RixlNCDMA== Received: from CO1NAM05FT042.eop-nam05.prod.protection.outlook.com (10.152.96.51) by CO1NAM05HT083.eop-nam05.prod.protection.outlook.com (10.152.97.25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.1771.6; Sat, 30 Mar 2019 11:36:27 +0000 Received: from MWHPR04MB0495.namprd04.prod.outlook.com (10.152.96.60) by CO1NAM05FT042.mail.protection.outlook.com (10.152.96.155) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.1771.6 via Frontend Transport; Sat, 30 Mar 2019 11:36:27 +0000 Received: from MWHPR04MB0495.namprd04.prod.outlook.com ([fe80::7176:ea53:f443:76b6]) by MWHPR04MB0495.namprd04.prod.outlook.com ([fe80::7176:ea53:f443:76b6%11]) with mapi id 15.20.1750.017; Sat, 30 Mar 2019 11:36:27 +0000 From: Carmel NY To: FreeBSD Subject: Re: Sending Tcsh to packages/ports ... Thread-Topic: Sending Tcsh to packages/ports ... Thread-Index: AQHU5uzQYIb6wialHU21J79OpSWvwg== Date: Sat, 30 Mar 2019 11:36:27 +0000 Message-ID: References: <64780f09d4251b9641e3bca39000ae2d@kathe.in> <869a55f05dde045b1947f53ce3c5851f@kathe.in> <20190330033342.e5fc3373.freebsd@edvax.de> <2aee9abe70cc944b634751e5df0b375e@kathe.in> <20190330035857.86508c3a.freebsd@edvax.de> <20190330054824.541c1bff.freebsd@edvax.de> In-Reply-To: <20190330054824.541c1bff.freebsd@edvax.de> Reply-To: FreeBSD Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: BN6PR08CA0055.namprd08.prod.outlook.com (2603:10b6:404:b9::17) To MWHPR04MB0495.namprd04.prod.outlook.com (2603:10b6:300:72::8) x-mailer: Claws Mail 3.17.3 (GTK+ 2.24.32; i686-w64-mingw32) x-incomingtopheadermarker: OriginalChecksum:96086E43CC6214AF8000C273675168EBB54F6EE62EEA138ABD3C15F17A7DE3F4; UpperCasedChecksum:35F14E16B16837D9A3F055512A2F84B58269707357BBA13A346B71A04C3B3A20; SizeAsReceived:7857; Count:52 x-ms-exchange-messagesentrepresentingtype: 1 x-tmn: [GVZ42K89vrrN3xHaefA1IJtgFIf1hA9P0YGYEsIY3ew=] x-microsoft-original-message-id: <20190330073604.000044d8@outlook.com> x-ms-publictraffictype: Email x-incomingheadercount: 52 x-eopattributedmessage: 0 x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(20181119110)(201702061078)(5061506573)(5061507331)(1603103135)(2017031320274)(2017031324274)(2017031323274)(2017031322404)(1601125500)(1603101475)(1701031045); SRVR:CO1NAM05HT083; x-ms-traffictypediagnostic: CO1NAM05HT083: x-microsoft-antispam-message-info: CfzS6RYNE/RRFfQ5QDgLvrn48enNAqh0KEWu6nMxB6KOQoL77u3HiF+7zACejghy Content-Type: text/plain; charset="us-ascii" Content-ID: <2B81B9A2A3AF0643A08E53112C8EC87D@namprd04.prod.outlook.com> Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-CrossTenant-Network-Message-Id: 444c0e38-aed7-4dec-1f09-08d6b503f23a X-MS-Exchange-CrossTenant-rms-persistedconsumerorg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-CrossTenant-originalarrivaltime: 30 Mar 2019 11:36:27.8483 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Internet X-MS-Exchange-CrossTenant-id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-Transport-CrossTenantHeadersStamped: CO1NAM05HT083 X-Rspamd-Queue-Id: 0D47784082 X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org; dkim=pass header.d=outlook.com header.s=selector1 header.b=eg4E4LCV; dmarc=pass (policy=none) header.from=outlook.com; spf=pass (mx1.freebsd.org: domain of carmel_ny@outlook.com designates 40.92.14.94 as permitted sender) smtp.mailfrom=carmel_ny@outlook.com X-Spamd-Result: default: False [0.05 / 15.00]; HAS_REPLYTO(0.00)[freebsd-questions@freebsd.org]; R_SPF_ALLOW(-0.20)[+ip4:40.92.0.0/15]; FREEMAIL_FROM(0.00)[outlook.com]; RCVD_COUNT_THREE(0.00)[4]; TO_DN_ALL(0.00)[]; MX_GOOD(-0.01)[cached: outlook-com.olc.protection.outlook.com]; DKIM_TRACE(0.00)[outlook.com:+]; DMARC_POLICY_ALLOW(-0.50)[outlook.com,none]; NEURAL_HAM_SHORT(-0.97)[-0.968,0]; FROM_EQ_ENVFROM(0.00)[]; RCVD_TLS_LAST(0.00)[]; MIME_TRACE(0.00)[0:+]; REPLYTO_EQ_TO_ADDR(5.00)[]; ASN(0.00)[asn:8075, ipnet:40.64.0.0/10, country:US]; FREEMAIL_ENVFROM(0.00)[outlook.com]; DWL_DNSWL_NONE(0.00)[outlook.com.dwl.dnswl.org : 127.0.3.0]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; R_DKIM_ALLOW(-0.20)[outlook.com:s=selector1]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[text/plain]; IP_SCORE(-0.98)[ipnet: 40.64.0.0/10(-2.59), asn: 8075(-2.23), country: US(-0.07)]; RCPT_COUNT_ONE(0.00)[1]; RCVD_IN_DNSWL_NONE(0.00)[94.14.92.40.list.dnswl.org : 127.0.3.0] X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 30 Mar 2019 11:36:37 -0000 On Sat, 30 Mar 2019 05:48:24 +0100, Polytropon stated: >On Sat, 30 Mar 2019 09:45:38 +0530, Mayuresh Kathe wrote: >> On 2019-03-30 08:28 AM, Polytropon wrote: =20 >> > On Sat, 30 Mar 2019 08:13:33 +0530, Mayuresh Kathe wrote: =20 >> >> On 2019-03-30 08:03 AM, Polytropon wrote: =20 >> >> > On Fri, 29 Mar 2019 19:08:16 +0530, Mayuresh Kathe wrote: =20 >> >> >> On 2019-03-29 04:59 PM, Daniel Feenberg wrote: =20 >> >> >> > On Fri, 29 Mar 2019, Mayuresh Kathe wrote: >> >> >> > =20 >> >> >> >> Since Tcsh is usually imported, why not send it to >> >> >> >> packages/ports collection? >> >> >> >> I agree that "csh" is an historically important artifact, >> >> >> >> but do we need to still rely on that? >> >> >> >> I have been using "csh" ever since I started using FreeBSD, >> >> >> >> liked it, but it doesn't feel light like plain old "sh" nor >> >> >> >> is as feature-full as "bash". To top that, the installer >> >> >> >> asks me to choose between "csh" and "tcsh" in-spite of >> >> >> >> being the same binary. =20 >> >> >> > >> >> >> > ed and csh are important for those that use them. I use >> >> >> > both, not always, but enough to see the importance of >> >> >> > keeping them in the OS. There is a fallacious style of >> >> >> > argument that decodes to "If a is better than b, then b is >> >> >> > no good and it is a sign of bad character to use b". There >> >> >> > are many cases where the transition costs of moving to >> >> >> > different dependencies will be significant, especially for >> >> >> > less well informed users. =20 >> >> >> >> >> >> What if you had access to your preferred tools via >> >> >> packages/ports? =20 >> >> > >> >> > The core problem is an educated consensus about what should >> >> > be the default content of the OS. Access to ports or packages >> >> > usually implies that you have (a) the installation media, or >> >> > (b) Internet access. In cases where this does not apply, for >> >> > reasons like "didn't think about that", "our Internet doesn't >> >> > work", "Security! Security! Security!" and more, you should >> >> > definitely _not_ be left with an OS that doesn't have a usable >> >> > interactive shell or an editor. The mentality of "you can always >> >> > install it afterwards" should not be applied to basic OS tools >> >> > and demands. =20 >> >>=20 >> >> But the basic operating system tools would include the Bourne >> >> Shell (sh), or as you'd stated previously, in the case of >> >> FreeBSD, the Almquist Shell (ash). Isn't "ash" interactive enough >> >> for most people? =20 >> >=20 >> > No. This shell is traditionally a scripting shell. The only >> > occassion where you would use it is after a severe system >> > crash, and even from that point, you'd probably just start >> > the C shell for better interactive features. >> >=20 >> > I hardly know people who use sh for more than "csh" (to start >> > csh). >> >=20 >> > On most Linux systems, there is one shell both for scripting >> > and for interactive use, and it's usually /bin/bash. FreeBSD >> > differentiates between scripting use, where the POSIX-compliant >> > sh is used, and interactive use, where the C shell is the >> > traditional shell, but a user can of course install and use >> > a different shell. >> >=20 >> > The scripting shell _must_ always be accessible, and FreeBSD >> > provides an interactive shell which also always works. >> >=20 >> > It's important to understand that a custom user shell might not >> > be available in single-user mode, in a condition where the system >> > can only operate in a very limited way. That's why it's still >> > valid to say you should not change root's interactive shell >> > to something like /usr/local/bin/bash which might cause trouble >> > logging in when /usr or /usr/local cannot be accessed. That's >> > what the toor user is intended for. >> >=20 >> > Sidenote: >> >=20 >> > Some historical UNIX systems actually used the C shell for >> > scripting to bring the system up into multi-user mode. Luckily, >> > this is not done anymore as scripting (!) in csh is terrible >> > and confusing. :-) =20 >>=20 >> Actually, looking it at it from a different angle, "csh" scripting >> would be ideal, because then one would need to know only one _style_ >> of programming, the "c" style. =20 > >The core problem with the C shell is that it has several >implementation flaws. There is a document by Tom Christiansen, >titled "Csh Programming Considered Harmful", summarized: > > The csh is a tool utterly inadequate for programming, > and its use for such purposes should be strictly banned. > >You can find the full text here: > > https://www-uxsup.csx.cam.ac.uk/misc/csh.html > >Personally, I once (!) wrote a C shell script, and this >particular script is still working, but I would _never_ again >do something like this. :-) > >That being said, sh (Bourne shell) has become the de-facto >standard for scripting, and with the POSIX compliance, it >allows you to write scripts that can be run on any OS that >provides a POSIX-compliant sh implementation, without needing >to test for the OS name, the shell version, or a specific >feature. > > > >> That's what I love about "Plan 9", it's shell "rc" uses a "c" style=20 >> scripting system and the shell is also quite interactive. =20 > >Even better: rc exposes the "everything is a file" metaphor >of the OS in a convenient way, so many things can be done >with tools that operate on files, even if that file represents >a network connection or a remote audio device. > > > >> >> At >> >> least I have found it good enough for my day-to-day use. =20 >> >=20 >> > You are actually using /bin/sh interactively? Not that it's >> > impossible, but... well... why use sh when the OS provides you >> > csh whose interactive features are much more advanced and >> > customizable? =20 >>=20 >> I don't know why, but I find it peaceful to use "/bin/sh". >> Probably because it's so small, so ancient and so well documented. >> Plus, I touch-type at a very high speed, so any mistakes, and I can=20 >> re-type my command chain effortlessly. =20 > >Same here, but I'd say that about the C shell, with only a >few configuration tweaks to make things appealing, instead >of the work I would have to invest to make bash behave in >a way comparable to certain csh defaults. :-) > >By the way, the zsh is often considered the most advanced >shell, as it incorporates all the advantages of existing shells >without also inheriting their annoying behaviour. It's well >documented and highly customizable, but works very good even >with only the defaults. There is a fairly comprehensive comparisons of the various shells available on wiki. https://en.wikipedia.org/wiki/Comparison_of_command_shells For the record, the first thing I do when doing a fresh install of FreBSD is to install "bash" and make it the default shell. Its documentation is some of the best I've seen and the bash forums are always available to assist you. --=20 Carmel