From fa4c34bd532fd2c37c616d2455a55b4a252e704b Mon Sep 17 00:00:00 2001 From: Sasha Koshka Date: Tue, 22 Oct 2024 15:52:07 -0400 Subject: [PATCH] cmd::desktop_entry: Some TODOs --- cmd/desktop_entry/main.ha | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/cmd/desktop_entry/main.ha b/cmd/desktop_entry/main.ha index 8ac619a..654d994 100644 --- a/cmd/desktop_entry/main.ha +++ b/cmd/desktop_entry/main.ha @@ -11,7 +11,7 @@ export fn main() void = { const cmd = getopt::parse( os::args, "parse and display desktop entries", - ('l', "locale", "the name of the locale to use"), + ('l', "locale", "the name of the locale to use"), // FIXME not working ('a', "action", "display a specific action"), "file"); defer getopt::finish(&cmd); @@ -38,6 +38,7 @@ export fn main() void = { os::exit(os::status::FAILURE); }; + // TODO put in function and handle errors here let file = os::open(file_name)!; defer io::close(file)!; let file = desktop_entry::parse(file)!; @@ -74,7 +75,8 @@ fn print_file (file: desktop_entry::file, local: locale::locale) (void | desktop case let icon: str => if (icon != "") fmt::printf("Icon={}\n", icon)?; case void => void; }; - // TODO + // TODO all other keys + // https://specifications.freedesktop.org/desktop-entry-spec/latest/recognized-keys.html }; fn print_action (file: desktop_entry::file, local: locale::locale, key: str) (void | desktop_entry::error) = {