Skip to content

Use UResult in all utils #2464

Description

@tertsdiepraam

With #2355 getting merged, we can start moving all utils to use UResult/UError. When this is done, the temporary gen_uumain macro can be incorporated into main and be removed.

Documentation for the error handling can be found in the uucore::error module in rustdoc format. The current implementation is not considered final, so feel free to suggest changes.

Examples of utils that use UResult:

  • ls
  • mkdir
  • mktemp
  • touch

Utils:

  • arch
  • base32
  • base64
  • basename
  • cat
  • chcon
  • chgrp
  • chmod
  • chown
  • chroot
  • cksum
  • comm
  • cp
  • csplit
  • cut
  • date
  • dd
  • df
  • dircolors
  • dirname
  • du
  • echo
  • env
  • expand
  • expr
  • factor
  • false
  • fmt
  • fold
  • groups
  • hashsum
  • head
  • hostid
  • hostname
  • id
  • install
  • join
  • kill
  • link
  • ln
  • logname
  • ls
  • mkdir
  • mkfifo
  • mknod
  • mktemp
  • more
  • mv
  • nice
  • nl
  • nohup
  • nproc
  • numfmt
  • od
  • paste
  • pathchk
  • pinky
  • pr
  • printenv
  • printf
  • ptx
  • pwd
  • readlink
  • realpath
  • relpath
  • rm
  • rmdir
  • seq
  • shred
  • shuf
  • sleep
  • sort
  • split
  • stat
  • stdbuf
  • sum
  • sync
  • tac
  • tail
  • tee
  • test
  • timeout
  • touch
  • tr
  • true
  • truncate
  • tsort
  • tty
  • uname
  • unexpand
  • uniq
  • unlink
  • uptime
  • users
  • wc
  • who
  • whoami
  • yes

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions