Gentoo Archives: gentoo-user

From: Nico Verrijdt <nicoverrijdt@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] [A bit off-topic] Bash alias and &
Date: Sun, 12 Jun 2016 14:33:22
Message-Id: CA+uX=Hbgm7EmPj=w1bkjokVQNDqCkKbghaz-uHq-7DEMMnvrdA@mail.gmail.com
In Reply to: [gentoo-user] [A bit off-topic] Bash alias and & by Andrew Lowe
1 Hi Andrew,
2
3 2016-06-12 16:26 GMT+02:00 Andrew Lowe <agl@×××××××.au>:
4
5 > Hi all,
6 > A bit off topic here, but there are plenty of people who seem to
7 > know their shells back to front so here goes.
8 >
9 > I have set up a Win32 based development environment,
10 > bash/cc/ls/etc/etc, for 1st year Engineering students who have to learn C
11 > on a command line. It's fine for me to remember to put the & at the end of
12 > the command when I fire up the editor but for them, it's major angst.
13 >
14 > The first thing that comes to mind is an alias. Just off the top
15 > of my head I tried:
16 >
17 > alias "npp=npp %1 &"
18 >
19
20 Shouldn't this be: alias npp="npp %1 &" ?
21
22
23 > npp being the editor, but that didn't work. Is an alias the best/easiest
24 > way to do this and if so, what would the syntax be, or is there a better
25 > way?
26 >
27 > Any thoughts, greatly appreciated,
28 >
29 > Andrew
30 >
31 >
32 Hope this helps,
33 Nico

Replies

Subject Author
Re: [gentoo-user] [A bit off-topic] Bash alias and & Alan McKinnon <alan.mckinnon@×××××.com>