summaryrefslogtreecommitdiff
path: root/Userland/Utilities
AgeCommit message (Collapse)Author
2022-01-04js: Remove uses of TRY_OR_DISCARD()Linus Groh
Slightly more verbose, but that's the last user of TRY_OR_DISCARD gone!
2022-01-04ls: Fix duplicated error message when opening a directory failsMarco Cutecchia
2022-01-04stat: Print an error if 'stat' failsMarco Cutecchia
2022-01-05LibCrypto: Make `Digest`s able to return `bytes`Michel Hermier
2022-01-05checksum: Use `:hex-dump` to format `digest` valueMichel Hermier
2022-01-05checksum: Make name detection working even with a pathMichel Hermier
2022-01-04unzip: Port to LibMainmjz19910
2022-01-04zip: Port to LibMain :^)mjz19910
2022-01-04profile: Specify the /proc/profile path in the help messageMathieu PATUREL
2022-01-04profile: Don't print anything when disabling profilingMathieu PATUREL
Just like when enabling profiling. Plus it's more unixy to not print anything on success
2022-01-04Userland: Resolve unused-but-set-varaible warningsAndrew Kaster
These are almost always bugs, so enable globally. Remove unused counter variables in SystemMonitor and disk_benchmark.
2022-01-04Userland: Fail Core::find_executable_in_path on empty inputsAndrew Kaster
Before this patch, `which ""` or `type ""` would say that the empty string is `/usr/local/bin/`. Convert callers to consistently call is_empty() on the returned string while we're at it, to support eventually removing the is_null() String state in the future.
2022-01-04wc: Port to LibMainmjz19910
2022-01-04which: Port to LibMainmjz19910
2022-01-04wsctl: Port to LibMainmjz19910
2022-01-04xargs: Port to LibMainmjz19910
2022-01-04yes: Port to LibMainmjz19910
2022-01-04uname: Port to LibMainmjz19910
2022-01-04uniq: Port to LibMainmjz19910
2022-01-04tar: Implement -C optioncircl
This allows specifying which directory to extract to or create from. I would have used the *at variants of the functions, but some weren't implemented yet.
2022-01-03LibJS: Return Optional<T> from Completion::{value,target}(), not TLinus Groh
In the end this is a nicer API than having separate has_{value,target}() and having to check those first, and then making another Optional from the unwrapped value: completion.has_value() ? completion.value() : Optional<Value> {} // ^^^^^^^^^^^^^^^^^^ // Implicit creation of non-empty Optional<Value> This way we need to unwrap the optional ourselves, but can easily pass it to something else as well. This is in anticipation of the AST using completions :^)
2022-01-02LibCore+id: Make more use of Core::System wrappers in Core::AccountAndreas Kling
2022-01-02rm: Check before removing '/'Lucas CHOLLET
A simple check to not erase '/' by mistake.
2022-01-02uptime: Port to LibMain :^)mjz19910
2022-01-01mkdir: Use FilePermissionsMask to handle mode optionXavier Defrang
2022-01-01chmod: Use FilePermissionsMask to handle mode argumentXavier Defrang
2022-01-01chown+chgrp: Add --no-dereference optioncircl
This option will change the ownership of the symlink rather than the file it points to.
2022-01-01fgrep: Port fgrep to LibMainKenneth Myhra
2022-01-01errno: Port to LibMainKenneth Myhra
2022-01-01du: Port to LibMainKenneth Myhra
This ports 'du' utility to LibMain. Also moves to use StringView and StringView literals more instead of raw C strings.
2021-12-30LibJS: Convert resolve_binding() to ThrowCompletionOrdavidot
The spec has a note stating that resolve binding will always return a reference whose [[ReferencedName]] field is name. However this is not correct as the underlying method GetIdentifierReference may throw on env.HasBinding(name) thus it can throw. However, there are some scenarios where it cannot throw because the reference is known to exist in that case we use MUST with a comment.
2021-12-30Utilities/lsusb: Propagate errors in JSON decodingcreator1creeper1
2021-12-30Utilities/arp: Propagate errors in JSON decodingcreator1creeper1
2021-12-30Utilities/netstat: Propagate errors in JSON decodingcreator1creeper1
2021-12-30Utilities/ifconfig: Propagate errors in JSON decodingcreator1creeper1
2021-12-30Utilities/notify: Propagate errors in Gfx::Bitmap loadingcreator1creeper1
2021-12-30Utilities/lsirq: Propagate errors in JSON decodingcreator1creeper1
2021-12-30Utilities/mount: Propagate errors in JSON decodingcreator1creeper1
2021-12-30Utilities/lsof: Propagate errors in JSON decodingcreator1creeper1
2021-12-30Userland: Link directly against LibUnicodeData where neededTimothy Flynn
This is partially a revert of commits: 10a8b6d4116c6a627a6c189154af032f69b29c21 561b67a1add82538502ef2f5733f1d86718898ad Rather than adding the prot_exec pledge requried to use dlopen(), we can link directly against LibUnicodeData in applications that we know need that library. This might make the dlopen() dance a bit unnecessary. The same purpose might now be fulfilled with weak symbols. That can be revisted next, but for now, this at least removes the potential security risk of apps like the Browser having prot_exec privileges.
2021-12-29less: Handle tabs in line wrappingPeter Elliott
Before tabs were treated as a width of 1, which would cause issues with man page headers.
2021-12-29Userland: Port less(1) to LibMainPeter Elliott
2021-12-29less: Remove all formatting before printing status linePeter Elliott
2021-12-29less: Dynamically re-wrap lines on resizePeter Elliott
This change moves from wrapping lines at the start to operating on whole lines and wrapping them as needed. This has a few added benefits: - line numbers are now always accurate. - going to a line actually works
2021-12-28LibCore+chown: Return ErrorOr<Optional<...>> for getgrnam and getpwnamKenneth Myhra
This patch returns an empty Optional<...> instead of an Error for Core::System::getgrname and Core::System::getpwnam if we can't find a matching group or user entry. It also updates the 'chown' utility to support this new behavior.
2021-12-28pls: Stop on first non option when parsing argumentsIdan Horowitz
This allows using pls on a program with arguments more ergonomically, e.g. `pls -- echo "hello friends"` can now simply be done as: `pls echo "hello friends"`.
2021-12-27LibJS+WebContent+Browser+js: Implement console.group() methodsSam Atkins
This implements: - console.group() - console.groupCollapsed() - console.groupEnd() In the Browser, we use `<details>` for the groups, which is not actually implemented yet, so groups are always open. In the REPL, groups are non-interactive, but still indent any output. This looks weird since the console prompt and return values remain on the far left, but this matches what Node does so it's probably fine. :^) I expect `console.group()` is not used much outside of browsers.
2021-12-27LibJS+WebContent+js: Bring console.trace() to specSam Atkins
The spec very kindly defines `Printer` as accepting "Implementation-specific representations of printable things such as a stack trace or group." for the `args`. We make use of that here by passing the `Trace` itself to `Printer`, instead of having to produce a representation of the stack trace in advance and then pass that to `Printer`. That both avoids the hassle of tracking whether the data has been html-encoded or not, and means clients don't have to implement the whole `trace()` algorithm, but only the code needed to output the trace.
2021-12-27LibJS+WebContent+js: Bring console.assert() to specSam Atkins
2021-12-27LibJS+WebContent+js: Bring console.clear() to specSam Atkins
This is identical to before, since we don't have "group stacks" yet, but clear() now uses ThrowCompletionOr.