Regardless of what the app does and whether the thing that does is particularly useful, powerful or important for what you need to do (or even well implemented), what is a command-line interface that you had a particularly good experience both learning and working with?

In other words, I’m thinking about command line interface design patterns that tend to correlate with good user experience.

“Good user experience” being vague, what I mean is, including (but not limited to)

  • discoverability–learning what features are available),
  • usability–those features actually being useful,
  • and expressiveness–being able to do more with less words without losing clarity,

but if there’s a CLI that has none of those but you still like it, I’d be happy to hear about it.

Edit: Trying to stress more that this post is not about the functionality behind the tool. Looks like most of first responders missed the nuance: whether app x is better than app y because it does x1 ad x2 differently or better does not matter; I’m purely interested in how the command line interface is designed (short/long flags, sub-commands, verbs, nouns, output behaviors)…

  • Black616Angel@discuss.tchncs.de
    link
    fedilink
    arrow-up
    1
    ·
    13 hours ago

    I actually like tar. Yes, it could have a default, but its also from another time. And remembering Xtract Zip File is not that hard. (v is for verbose for those wondering)

    • hobata@lemmy.ml
      link
      fedilink
      arrow-up
      3
      ·
      12 hours ago
      extract () {
        if [ $# -ne 1 ]
        then
          echo "Error: No file specified."
          return 1
        fi
          if [ -f "$1" ] ; then
              case "$1" in
                  *.tar.bz2) tar xvjf "$1"   ;;
                  *.tar.gz)  tar xvzf "$1"   ;;
                  *.tar.xz)  tar xvf "$1"    ;;
                  *.tar.zst) tar axvf "$1"   ;;
                  *.xz)      xz -kd "$1"     ;;
                  *.bz2)     bunzip2 "$1"    ;;
                  *.gz)      gunzip "$1"     ;;
                  *.tar)     tar xvf "$1"    ;;
                  *.tbz2)    tar xvjf "$1"   ;;
                  *.tgz)     tar xvzf "$1"   ;;
                  *.lzma)    unlzma "$1"     ;;
                  *.rar)     unrar x "$1"    ;;
                  *.zip)     unzip "$1"      ;;
                  *.Z)       uncompress "$1" ;;
                  *.7z)      7z x "$1"       ;;
                  *.exe)     cabextract "$1" ;;
                  *.deb)     ar x "$1"       ;;
                  *.jar)     jar xf "$1"     ;;
                  *)         echo "'$1' cannot be extracted via extract" ;;
              esac
          else
              echo "'$1' is not a valid file"
          fi
      }
      
      • Coriza@lemmy.world
        link
        fedilink
        arrow-up
        1
        ·
        10 hours ago

        You don’t even need to specify the decompression algorithm anymore, I don’t even know if it was mandatory at some point but since I was introduced to Linux like 20 years ago tar would already extrapolate the decompression from the filename extension. Now for the compression I think you do need to include the algorithm, it would be nice if it would default to the extension on the supplied filename also.