1 |
On 06/12/16 22:43, Alan McKinnon wrote: |
2 |
> On 12/06/2016 16:33, Nico Verrijdt wrote: |
3 |
>> Hi Andrew, |
4 |
>> |
5 |
>> 2016-06-12 16:26 GMT+02:00 Andrew Lowe <agl@×××××××.au |
6 |
>> <mailto:agl@×××××××.au>>: |
7 |
>> |
8 |
>> Hi all, |
9 |
>> A bit off topic here, but there are plenty of people who |
10 |
>> seem to know their shells back to front so here goes. |
11 |
>> |
12 |
>> I have set up a Win32 based development environment, |
13 |
>> bash/cc/ls/etc/etc, for 1st year Engineering students who have to |
14 |
>> learn C on a command line. It's fine for me to remember to put the & |
15 |
>> at the end of the command when I fire up the editor but for them, |
16 |
>> it's major angst. |
17 |
>> |
18 |
>> The first thing that comes to mind is an alias. Just off |
19 |
>> the top of my head I tried: |
20 |
>> |
21 |
>> alias "npp=npp %1 &" |
22 |
>> |
23 |
>> Shouldn't this be: alias npp="npp %1 &" ? |
24 |
>> |
25 |
>> |
26 |
>> npp being the editor, but that didn't work. Is an alias the |
27 |
>> best/easiest way to do this and if so, what would the syntax be, or |
28 |
>> is there a better way? |
29 |
>> |
30 |
>> Any thoughts, greatly appreciated, |
31 |
>> |
32 |
>> Andrew |
33 |
>> |
34 |
>> |
35 |
>> Hope this helps, |
36 |
>> Nico |
37 |
> |
38 |
> |
39 |
> Or just tell them to remember to add the & at the end. |
40 |
> With an alias what will they do when they don't want it? |
41 |
> |
42 |
> Or look at it this way: |
43 |
> |
44 |
> It's syntax, it's important. C is probably more syntax-critical than any |
45 |
> other language around (binds to the right, anyone?) so what's the |
46 |
> problem with requiring correct syntax on the command line as well? |
47 |
> |
48 |
> Obligatory disclaimer: I've recently had a bellyache full of dumb people |
49 |
> who insist I put code when a human (themselves) belongs... |
50 |
> |
51 |
Yes, I agree BUT, this is a "half subject" in a common first year of an |
52 |
Engineering degree. These are people who will become |
53 |
Civil/Mechanical/Electrical/Chemical Engineers and they have no desire |
54 |
to learn programming. To put it bluntly, all they are interested in is |
55 |
their car, getting drunk and trying to get a root - the order may vary, |
56 |
but that is the top three priorities. Anything else is just too much to |
57 |
think about. |
58 |
|
59 |
In reality, I'm doing this to make my life easier. As much as I tell |
60 |
them to do something, write up documents that tell them what to do and |
61 |
reiterate what they have to do, I still get the question "It's broken, |
62 |
it won't do as I want...." |
63 |
|
64 |
Andrew |
65 |
|
66 |
p.s. Nico's point was a typo on my part in the email. |