From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 580FA13829C for ; Sun, 12 Jun 2016 14:43:39 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 7E259E0B21; Sun, 12 Jun 2016 14:43:31 +0000 (UTC) Received: from mail-wm0-f53.google.com (mail-wm0-f53.google.com [74.125.82.53]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 483B6E0B0A for ; Sun, 12 Jun 2016 14:43:30 +0000 (UTC) Received: by mail-wm0-f53.google.com with SMTP id v199so47070217wmv.0 for ; Sun, 12 Jun 2016 07:43:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-transfer-encoding; bh=uEqoV7rWOZi3IOUdCnmbYVsMpN1QH+DCZJ3qpvhD98Y=; b=VNrdt/GZWaKu90nUhTIln2wDu230caWpaVvfiXnNjrrWZ/EBGTdi1Pam14cxYdxWlg A3dSeIaWZGcCJfSTuXq/3eDYQWvECWC/BzyI8bpQxU8+6gY1jLSZNoYVv4DzWpSLvl+i r4b9xZEktN2K29u4+lMAHxEisrxXb8+op7xw8S6Fsax38oB7/Nqfwek45+3tpOKhFjp2 vcLqT5MDcurlYr3Q8nd2yvavCmZj0UDThU01Dsw9GeR+BNJtSkqCtfzR1x46XHgf4t9o aVUXufIQw09RyGnsYn0ol+4rkW5PqEGbYpgm9hxkLmz/6xevieK1GoaBAMiIe4gRz980 KFRQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=uEqoV7rWOZi3IOUdCnmbYVsMpN1QH+DCZJ3qpvhD98Y=; b=m2Wbmy/PoffDu2Eckl0DsEHLLTaucTVI/pUwG+yTqNnqI0kDeyr+2xSAhLHSFzamiO 4f07TKgNHGUYDwew/5Yy4iw2w0+7yWM7pEvUk1H0DdHOAuxVK6O8a5xlLyx9/VTqCJhF Uz0Aeo4GBPwoIseO8A96blsmtCbp90xlCUqesQdNH3qsS1U6gjzcfIWo4KSUdS3xy0hA fI+Aqa4aQlIBG9PE+WvfdDYcigj/YAnuzwFLBLEGNoN6yotL5KgfChG90es1IpL3xgcq o/6Ax0B7SoIYj7K39P9ss8mZC3FumRwSuLzk/pUvN9yt++5ymAQtlA9sDvJ4A4f/mMTj TAuA== X-Gm-Message-State: ALyK8tLB1PzWmogPY/rsLCBapY1PadDt4kRWBOeSHgrwj2QzKrluo6SK0VyPBsFVJ5gfMg== X-Received: by 10.194.115.230 with SMTP id jr6mr10368934wjb.125.1465742608717; Sun, 12 Jun 2016 07:43:28 -0700 (PDT) Received: from [172.29.2.10] ([209.212.109.4]) by smtp.gmail.com with ESMTPSA id dj4sm22608100wjc.13.2016.06.12.07.43.26 for (version=TLSv1/SSLv3 cipher=OTHER); Sun, 12 Jun 2016 07:43:28 -0700 (PDT) Subject: Re: [gentoo-user] [A bit off-topic] Bash alias and & To: gentoo-user@lists.gentoo.org References: <55ce9d76-0d0e-7529-38b4-950496cf9eb4@wht.com.au> From: Alan McKinnon Message-ID: <575D750D.4020007@gmail.com> Date: Sun, 12 Jun 2016 16:43:25 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.8.0 Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@lists.gentoo.org Reply-to: gentoo-user@lists.gentoo.org MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Archives-Salt: c5d3181b-5346-4cd2-9128-0bdb9543f63e X-Archives-Hash: e96c7b1a0d394007a6368cc195752292 On 12/06/2016 16:33, Nico Verrijdt wrote: > Hi Andrew, > > 2016-06-12 16:26 GMT+02:00 Andrew Lowe >: > > Hi all, > A bit off topic here, but there are plenty of people who > seem to know their shells back to front so here goes. > > I have set up a Win32 based development environment, > bash/cc/ls/etc/etc, for 1st year Engineering students who have to > learn C on a command line. It's fine for me to remember to put the & > at the end of the command when I fire up the editor but for them, > it's major angst. > > The first thing that comes to mind is an alias. Just off > the top of my head I tried: > > alias "npp=npp %1 &" > > Shouldn't this be: alias npp="npp %1 &" ? > > > npp being the editor, but that didn't work. Is an alias the > best/easiest way to do this and if so, what would the syntax be, or > is there a better way? > > Any thoughts, greatly appreciated, > > Andrew > > > Hope this helps, > Nico Or just tell them to remember to add the & at the end. With an alias what will they do when they don't want it? Or look at it this way: It's syntax, it's important. C is probably more syntax-critical than any other language around (binds to the right, anyone?) so what's the problem with requiring correct syntax on the command line as well? Obligatory disclaimer: I've recently had a bellyache full of dumb people who insist I put code when a human (themselves) belongs...