octopress icon indicating copy to clipboard operation
octopress copied to clipboard

:copydot should ignore vim swap files

Open achiang opened this issue 11 years ago • 5 comments

Seems fairly common to want to rake deploy while you might still be editing a blog post in vim (which creates hidden .swp files). If you attempt to do so, you'll trip on OSX with the following:

cp -r source/_posts/.2013-12-09-test.markdown.swp public/_posts/.2013-12-09-test.markdown.swp rake aborted! No such file or directory - public/_posts/.2013-12-09-test.markdown.swp

Instead, let's try to avoid copying .swp files.

See also: commit 254cdd35

achiang avatar Dec 10 '13 02:12 achiang

:+1:

parkr avatar Dec 10 '13 02:12 parkr

Given https://github.com/imathis/octopress/issues/1449 as well, it seems that :copydot needs a bit of work to only copy the right, true set of dot files. Is there a ways to nail this down instead of encountering edge cases along the way? Would it be politic to avoid copying dot files from underscore directories in source?

tamouse avatar Dec 26 '13 03:12 tamouse

While leaving the note above, I noticed this at https://github.com/imathis/octopress/blob/master/Rakefile#L233 . Do we really want a .gsub here or just a .sub ? We can't predict what someone who repeats the source directory name further down the path might absolutely want, but forcing it to be the destination directory name seems like it might not be what they want:

gsub: source/images/source/.something ~> public/images/public/.something
sub:   source/images/source/.something ~> public/images/source/.something

for example

tamouse avatar Dec 26 '13 03:12 tamouse

+1

suzaku avatar Feb 24 '15 03:02 suzaku

+1

Any reason this isn't getting merged?

dgmstuart avatar Mar 25 '15 10:03 dgmstuart