KenKundert / emborg

Interactive command line interface to Borg Backup
GNU General Public License v3.0
94 stars 8 forks source link

How to add a folder with spaces in its name to the pattern list? #50

Closed stefanobartoletti closed 2 years ago

stefanobartoletti commented 2 years ago

Hi, I need to add a folder which has spaces in its name to the pattern of folders to backup.

In example, how can I add ~/.config/My Dir/ to my pattern which i.e. is:

patterns = '''
    R ~/Documents
    R ~/Music
    - ~/Documents/work
'''
KenKundert commented 2 years ago

I believe you would add a path that contains a space in the same way as you would with any other path. Did you try it?

If it does not work, you could try specifying your patterns as a list of strings rather than a giant string:

patterns = [
    "R ~/Documents",
    "R ~/Music",
    "R ~/.config/My Dir",
    "- ~/Documents/work",
]
stefanobartoletti commented 2 years ago

Thank you, by using brackets and multiple strings it worked