This works from command line:
scp -r ^.git b:/home/wopi/blyzics/.
when I paste the above line in a script like this:
#!/usr/bin/env zsh scp -r ^.git b:/home/wopi/blyzics/.
And run it
^.git: No such file or directory
See the zsh manual for info. To enable this in your scripts you can simply run:
at the top of your script. Note that this isn't portable, however.