Eshell accepts ksh-like syntax. Amog others you can specify a group of files by
(file1|file2|...|fileN). But, that is a bit tricky since parentheses also indicate lisp forms to be evaluated (for an example see the answer by lawlist).
Furthermore, there are also predicates in parenthesis. The predicates come as last thing of a path specification.
prints a list of directories.
To differentiate groups from lisp forms and predicates you must append something to the group string. Maybe, you want to append something anyway.
As a last resort you can just append an empty string
The solution to the original-posters problem would be:
cp /Users/HOME/.0.data/.0.emacs/.0.sources/emacs/(buffer.c|buffer.h|dispextern.h|keyboard.c|nsterm.m|w32term.c|window.h|xdisp.c|xterm.c)'' ~/Desktop/emacs/src/
In the following I cite the help strings
eshell-modifier-help-string as an add-on to the answer.
Maybe the modifiers and predicates are not so well known even if they are a quite powerful system. (At least I did not know about them until I answered this question.)
Eshell predicate quick reference:
- follow symbolic references for predicates after the `-'
^ invert sense of predicates after the `^'
/ directories s sockets
. regular files p named pipes
* executable (files only) @ symbolic links
%x file type == `x' (as by ls -l; so `c' = char device, etc.)
PERMISSION BITS (for owner/group/world):
r/A/R readable s setuid
w/I/W writable S setgid
x/E/X executable t sticky bit
U owned by effective uid
u(UID|'user') owned by UID/user
g(GID|'group') owned by GID/group
l[+-]N +/-/= N links
a[Mwhms][+-](N|'FILE') access time +/-/= N months/weeks/hours/mins/secs
(days if unspecified) if FILE specified,
use as comparison basis; so a+'file.c'
shows files accessed before file.c was
m[Mwhms][+-](N|'FILE') modification time...
c[Mwhms][+-](N|'FILE') change time...
L[kmp][+-]N file size +/-/= N Kb/Mb/blocks
*(^@) all non-dot files which are not symlinks
.#*(^@) all files which are not symbolic links
**/.#*(*) all executable files, searched recursively
***/*~f*(-/) recursively (though not traversing symlinks),
find all directories (or symlinks referring to
directories) whose names do not begin with f.
e*(*Lk+50) executables 50k or larger beginning with 'e'
Eshell modifier quick reference:
FOR SINGLE ARGUMENTS, or each argument of a list of strings:
E evaluate again
e file extension
r strip file extension
q escape special characters
S split string at any whitespace character
S/PAT/ split string at each occurrence of PAT
FOR LISTS OF ARGUMENTS:
o sort alphabetically
O reverse sort alphabetically
u uniq list (typically used after :o or :O)
R reverse list
j join list members, separated by a space
j/PAT/ join list members, separated by PAT
i/PAT/ exclude all members not matching PAT
x/PAT/ exclude all members matching PAT
s/pat/match/ substitute PAT with MATCH
g/pat/match/ substitute PAT with MATCH for all occurrences
*.c(:o) sorted list of .c files