Filenames with spaces; output beside the input file; warning fixes (from dev c08eb1bbfa4c)
- Filenames may contain spaces: quote on the command line; filename lists use a standalone "/" separator; unseparated names that do not exist are rejoined into names that do (announced); leading ~ expands. - Without -o, output is written to the input file's directory; -o fully specifies the output directory and basename. - "Word not parsed" warnings now appear without -v, only for text that survives removal, with correct line numbers. - New tst/filename_test.sh regression suite. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -107,7 +107,7 @@ int main(int argc, char* argv[])
|
||||
// (infrastructure) and load no klammer set.
|
||||
if (args.given("font")) {
|
||||
strings_t words {};
|
||||
for (const std::string& w : word_split(args.get("font"))) {
|
||||
for (const std::string& w : args.as_vector("font")) {
|
||||
if (!w.empty()) {
|
||||
words.push_back(w);
|
||||
}
|
||||
@@ -118,7 +118,7 @@ int main(int argc, char* argv[])
|
||||
|
||||
Machine M;
|
||||
|
||||
strings_t input_filenames = args.as_vector("input");
|
||||
strings_t input_filenames = resolve_filename_list(args.get("input"));
|
||||
std::cout << "input_filenames: " << input_filenames << "\n";
|
||||
if (input_filenames.empty()) {
|
||||
M.read(fs::path(M.m_state.value("KLAMMERTEXT_HOME") + "/sks/sks.k"));
|
||||
|
||||
Reference in New Issue
Block a user