Commits
- Commit:
5acf19ec96258db04cb04a15bb769cefc9e923f5
- From:
- Thomas Adam <thomas.adam22@gmail.com>
- Date:
mailcap: reset string parser state for cmd handling
When interpolating a mailcap command, make sure we reset the state of
the string parser each time, otherwise the intended command is never
interpolated.
This would mean that previous commands would get run with old files, or
worse still, segfault.
- Commit:
d37f75805ed5a94e42378dc8f3b60055be71054a
- From:
- Omar Polo <op@omarpolo.com>
- Date:
add --with-default-opener; use to open(1) on mac and xdg-open elsewhere
- Commit:
3d89457cdeba5041aa6f0c1f8640b91bcbb6ec51
- From:
- Thomas Adam <thomas.adam22@gmail.com>
- Date:
code: add wrappers for common failure cases
Certain calls to well-known functions sometimes result in similar
error handling across the code base. Sometimes there's a need to
centralise the failure case.
Achieve this for common wrappers to often-used functions.
The transformation is achieved via coccinelle, commited with this patch.
Note that coccinelle can be told to ignore code blocks with comment
delimiters.
This transformation applies just to telescope's code, and not any of the
bundled depdencies in telescope (libgrapheme).
- Commit:
25ae590a464021cf40c0048bd25caa22edb8b892
- From:
- Omar Polo <op@omarpolo.com>
- Date:
mailcap: change the default to run xdg-open in the background
- Commit:
52ec20aed48036d6ead6648e4cb4aaac0a306ebd
- From:
- Thomas Adam <thomas.adam22@gmail.com>
- Date:
mailcap: improve flag handling
Extra information present on a mailcap line can extend to almost
anything. It cannot be assumed that flags such as "copiousoutput" or
"needsterminal" will be the first set of flags after the command field.
For now, treat everything after the "command" part of a mailcap entry as
potential fields, and still scan for "copiousoutput" and
"needsterminal".
- Commit:
f141d2d1d0ceb8bda0ed3656141ec52c5c6e534f
- From:
- Omar Polo <op@omarpolo.com>
- Date:
mailcap: fix str_trim_whitespace
return the pointer advanced past the leading blanks too.
- Commit:
22d3f8e4de62efd76c31c5310120e36ffbdebb3d
- From:
- Omar Polo <op@omarpolo.com>
- Date:
mailcap: ignore comments too
- Commit:
836a2edc972102f05b1d6d7700b3ed8a8afcc5b8
- From:
- Omar Polo <op@omarpolo.com>
- Date:
mailcap: extract the FILE parsing routine and export it
so that we can write tests for this module.
- Commit:
dcdea5d144e2eb2dc27299e73c0713a2d03e44cd
- From:
- Omar Polo <op@omarpolo.com>
- Date:
mailcap: whitespace nits
- Commit:
8e1fb8d5023e6f5a977b55d5f8cacd7cdec9773f
- From:
- Thomas Adam <thomas.adam22@gmail.com>
- Date:
mailcap: add parser for external command handling
This introduces a (limited) subset of mailcap handling, as defined in
RFC 1524.
This makes it possible for telescope to run commands on different mime
types as defined in a mailcap file, but defaults to a default mime type
of using xdg-open if no match is found, or no mailcap file defined.