In Terminal (using bash and tcsh) cp -r copies the contents of a folder instead of the folder if the folder argument has a / at the end.
Given the following structure:
folderA |-fileA |-fileB
The following command copies fileA and fileB to destination instead of copying folderA to the destination:
cp -r folderA/ destination
So it acts as
cp -r folderA/* destination
This is super annoying because by default completion in tcsh adds a / at the end of the folder, so I always end up having to clean up if I forget to delete the / at the end. This behavior is different from every other *nix I've worked on.
Is there any way to change this and make cp -r folderA/ copy the folder instead of its contents?