summaryrefslogtreecommitdiff
path: root/Userland/Utilities
AgeCommit message (Collapse)Author
2022-01-28Revert "Userland: Invoke tzset in apps that care about time zones"Timothy Flynn
This reverts most of commit ede5c9548e55d8216dba21ed431b9e53d085a248. The one change not reverted is ClockWidget.h, so that the taskbar clock can continue to notice time zone changes.
2022-01-28ls: Display times in the user's local time zoneTimothy Flynn
ls is already using local time, but needs tzset() for that to actually work.
2022-01-27ping: Port to LibMainbrapru
2022-01-25date: Display time zone information in all output formatsTimothy Flynn
2022-01-25Kernel: Use u64 instead of size_t in the STORAGE_DEVICE_GET_SIZE ioctlIdan Horowitz
This ensures the device size doesn't get truncated on i686.
2022-01-25js: Implement pretty-printing of Intl.RelativeTimeFormatTimothy Flynn
2022-01-25LibTimeZone+Userland: Rename current_time_zone to system_time_zoneTimothy Flynn
This renames the current implementation of current_time_zone to system_time_zone to more clearly indicate what it is. Then reimplements current_time_zone to return whatever was set up by tzset, falling back to UTC if something went awry, for convenience.
2022-01-25Userland: Invoke tzset in applications that care about time zonesTimothy Flynn
In most applications, we invoke tzset once at startup for now. Most of these are short lived and don't need to know about time zone changes. The exception is the ClockWidget in the taskbar. Here, we invoke tzset each time we update the system time. This way, any time zone changes can take effect immediately.
2022-01-25timezone: Add an option to list all time zonesTimothy Flynn
2022-01-25AK: Standardize the behaviour of GenericLexer::consume_until overloadsIdan Horowitz
Before this commit all consume_until overloads aside from the Predicate one would consume (and ignore) the stop char/string, while the Predicate overload would not, in order to keep behaviour consistent, the other overloads no longer consume the stop char/string as well.
2022-01-25tree: Port to LibMainNames4Noobs
2022-01-25rmdir: Port to LibMainAriel Abreu
2022-01-25rm: Port to LibMainAriel Abreu
2022-01-25md: Port to LibMainFabian INGREMEAU
2022-01-25mv: Port to LibMainFabian INGREMEAU
2022-01-25tail: Port to LibMainFabian INGREMEAU
2022-01-24less: Fix memory leak when scrolling to EOFRummskartoffel
2022-01-24AK+Userland: Make AK::decode_base64 return ErrorOrSam Atkins
2022-01-24Everywhere: Convert ByteBuffer factory methods from Optional -> ErrorOrSam Atkins
Apologies for the enormous commit, but I don't see a way to split this up nicely. In the vast majority of cases it's a simple change. A few extra places can use TRY instead of manual error checking though. :^)
2022-01-24Utilities/readelf: Add support for printing the content of sectionsDaniel Bertalan
2022-01-24mktemp: Port to LibMainKenneth Myhra
2022-01-24mkfifo: Port to LibMainKenneth Myhra
2022-01-24mknod: Port to LibMainKenneth Myhra
2022-01-24sort: Port to LibMainMichel Hermier
2022-01-24shuf: Port to LibMainMichel Hermier
2022-01-24rev: Port to LibMainMichel Hermier
2022-01-23gunzip: Don't truncate output filename when input file suffix is omittedRummskartoffel
Before this commit, `$ gunzip abcd` would incorrectly uncompress `abcd.gz` to `a` instead of to `abcd`.
2022-01-23find: Fix crash on missing argumentsDavid Lindbom
Fixes #12075
2022-01-23timezone: Add a command line utility to set the system time zoneTimothy Flynn
2022-01-23Userland: Add promises to programs that will read /etc/timezoneTimothy Flynn
This will require unveiling /etc/timezone itself for reading, as well as the rpath pledge promise.
2022-01-22ping: Handle optional field in the IPv4 headerdayarthvader
2022-01-22markdown-check: Ignore absolute icon pathsIdan Horowitz
We have no good way to handle these yet, and there's no point in forcing everyone to skip their pre-commit checks.
2022-01-22umount: Port to LibMainFederico Guerinoni
2022-01-22Utilities+Lagom: Remove test-cryptoNico Weber
After 4d5ffd364a3, Tests/{LibCrypto,LibTLS} test the same things and test-crypto has been redundant since then.
2022-01-22js: Display a warning if multiple files are givendavidot
Also instead of making a frankenstein path with all the paths combined just take the first one, this is needed for resolving modules.
2022-01-22LibJS: Implement ImportCall and HostImportModuleDynamicallydavidot
This allows us to load modules from scripts. This can be dangerous as it can load arbitrary files. Because of that it fails and throws by default. Currently, only js and JavaScriptTestRunner enable the default hook. This also adds tests to test-js which test module code. Because we form a spec perspective can't "enter" a module this is the easiest way to run tests without having to modify test-js to have special cases for modules. To specify modules in test-js we use the extension '.mjs' this is to ensure the files are not executed. We do still want to lint these files so the prettier scripts have changed to look for '.mjs' files as well.
2022-01-22LibJS: Refactor interpreter to use Script and Source Text ModulesLuke Wilde
This also refactors interpreter creation to follow InitializeHostDefinedRealm, but I couldn't fit it in the title :^) This allows us to follow the spec much more closely rather than being completely ad-hoc with just the parse node instead of having all the surrounding data such as the realm of the parse node. The interpreter creation refactor creates the global execution context once and doesn't take it off the stack. This allows LibWeb to take the global execution context and manually handle it, following the HTML spec. The HTML spec calls this the "realm execution context" of the environment settings object. It also allows us to specify the globalThis type, as it can be different from the global object type. For example, on the web, Window global objects use a WindowProxy global this value to enforce the same origin policy on operations like [[GetOwnProperty]]. Finally, it allows us to directly call Program::execute in perform_eval and perform_shadow_realm_eval as this moves global_declaration_instantiation into Interpreter::run (ScriptEvaluation) as per the spec. Note that this doesn't evalulate Source Text Modules yet or refactor the bytecode interpreter, that's work for future us :^) This patch was originally build by Luke for the environment settings object change but was also needed for modules. So I (davidot) have modified it with the new completion changes and setup for that. Co-authored-by: davidot <davidot@serenityos.org>
2022-01-21groups: Do not attempt to open /etc/groupsJean-Baptiste Boric
2022-01-21pwd: Add missing rpath pledgeJean-Baptiste Boric
2022-01-21zip: Add unveil and pledge promisesDavid Lindbom
2022-01-21cal: Add unveil and pledge promisesDavid Lindbom
2022-01-21aplay: Add unveil and pledge promisesDavid Lindbom
2022-01-21adjtime: Port to LibMainmjz19910
2022-01-18LibCrypto+LibJS: Better bigint bitwise_or binopNico Weber
Similar to the bitwise_and change, but we have to be careful to sign-extend two's complement numbers only up to the highest set bit in the positive number.
2022-01-18disasm: Don't fail when trying to disassemble empty filesRummskartoffel
Given an empty file, disasm would try to create a zero-size memory mapping of that file, which would fail with EINVAL.
2022-01-18disasm: Convert to east-const and C++-style castsRummskartoffel
2022-01-16readelf: Fall back to default interpreter path on empty pathThijs Waalen
This fixes readelf failing to map the interpreter for dynamic libraries. When an ELF does not have the PT_INTERP header the StringView will be of the inline capacity of the StringBuilder, not a null StringView. This would cause readelf not to fallback on the default interpreter path.
2022-01-16LibJS: Fix that '_' no longer accessed the last value in the REPLdavidot
This is now also not a concept that VM knows about and handled completely by the REPL.
2022-01-16groupadd: Port to LibMain and use the new Core::Group abstraction :^)Kenneth Myhra
2022-01-15nc: Port to LibMainKenneth Myhra