Ensure tags files are not read twice through different paths.
Handle paths containings space correctly
Closes#802, to which much credits goes for this change.
This commit uses options and flags that will work on both the BSD and
the `man-db` implementations, however those changes remain unportable as
the POSIX standard only defines a single `-k` flag for the utility,
which we don't need.
The call to the `col` utility has also been replaced by a call to `sed`,
as the former is only shipped on systems that have the `nroff` formatter
installed.
The default commenting character is now '#', considering the superior
amount of files that use it for comments compared to the previous
C-style comment characters.
The logic now also prioritize the opening commenting characters if they
contain a colon, to be able to use selection commenting on markdown
files.
This commit properly produces backslash characters within double quote
strings instead of hoping the shell will not recognize the escape
sequence that they form with the following character. Use the proper
POSIX function declaration form.
The uncommenting logic now also ignores trailing newline characters,
which shortens the amount of operations needed to uncomment a selection.
Initialising the `comment_line_chars` and `comment_selection_chars` variables
in language support scripts created a hard dependency of those scripts
to `commenting.kak`, which would create errors when this script was not
loaded, e.g. when running tests.
Initializing the `formatcmd` variable in the default language support
scripts created a dependency to the `formatter.kak` script, which we do
not want. Examples of such cases are when users haven't loaded the
`formatter.kak` script, or when Kakoune runs its test suite and
selectively loads some language scripts for testing purposes.