Tagging files happens when we copy files inside a tag directory. To test this, we use the movie "First Contact" and place it in the startrek tag-directory. The command is basically:
$ cp first_contact.avi ~/myfiles/tags/startrek/@/
You must have noticed the special @/ directory in the end. This is how you inform Tagsistant where the list of tags ends. Now let's check our file is where we put it:
$ ls ~/myfiles/tags/startrek/@/
first_contact.avi
As you see we must always put the @/ element at the end of the tag list. To make it a little more meaningful the role of @/, we can use more than one tag with the next movie:
$ cp the_wrath_of_khan.avi ~/myfiles/tags/startrek/video/@
In English: tag the movie "The Wrath of Khan" as both startrek and video.
But wait! We taught Tagsistant that scifi/ includes startrek/, so let's check if our files are in the scifi/ tag too:
$ ls ~/myfiles/tags/scifi/@/
first_contact.avi the_wrath_of_khan.avi
Yes! The files are in both directories: startrek and scifi. That's because Tagsistant has an internal reasoner which uses the relations you provide to include files not directly tagged. Now let's tag something else:
$ cp the_empire_strikes_back.avi ~/myfiles/tags/starwars/@/
$ ls ~/myfiles/tags/scifi/@/
first_contact.avi the_wrath_of_khan.avi the_empire_strikes_back.avi
No files are directly tagged as scifi/ but since it includes both startrek/ and starwars/ now it features three files. The real benefit of using relations is reducing the length of your queries while looking for your files. Another way to get the same set of results would be searching all the files tagged startrek/ and all the files tagged as starwars/, with this query:
$ ls ~/myfiles/tags/startrek/+/starwars/@/
first_contact.avi the_wrath_of_khan.avi the_empire_strikes_back.avi
As you can see, the query scifi/@/ is much shorter than the query startrek/+/starwars/@/.
What about the +/ directory in the middle of the path? It means: get the result of the first part of the query (startrek/) and merge them with the result of the second part of the query (starwars/). This is totally different from writing two tags without a +/ in between. In that case you are looking for files that are tagged by both tags, like in:
$ ls ~/myfiles/tags/startrek/starwars/@/
which ends in no results (hopefully).