Fanaticus
  • Communities
  • Create Post
  • Create Community
  • heart
    Support Lemmy
  • search
    Search
  • Login
  • Sign Up
@cybercitizen4@lemm.ee to Asklemmy@lemmy.ml • 8 months ago

What's a handy terminal command you use often?

message-square
275
fedilink
222
message-square

What's a handy terminal command you use often?

@cybercitizen4@lemm.ee to Asklemmy@lemmy.ml • 8 months ago
message-square
275
fedilink
  • @emb@lemmy.world
    link
    fedilink
    45•8 months ago

    I really like that cd command. :P

    • @unknowing8343@discuss.tchncs.de
      link
      fedilink
      20•8 months ago

      You’ll love zoxide then.

      • @velox_vulnus@lemmy.ml
        link
        fedilink
        English
        0•
        edit-2
        6 months ago

        deleted by creator

        • @Yoddel_Hickory@lemmy.ca
          link
          fedilink
          23•8 months ago

          The command is ‘z’

          • @velox_vulnus@lemmy.ml
            link
            fedilink
            English
            7•
            edit-2
            6 months ago

            deleted by creator

            • @unknowing8343@discuss.tchncs.de
              link
              fedilink
              5•8 months ago

              It’s in the official docs for zoxide, you are supposed to use the z alias, and many distros just set it up directly like that. I love doing z notes from wherever I am.

              • @7dev7random7@suppo.fi
                link
                fedilink
                1•8 months ago

                Description fifth point (5.)

                That doesn’t require a separate package, especially one which uses eval on every new shell. And isn’t messing with my distros or personal aliases (and doesn’t introduce cargo-packaging).

                Simply adding one to two (you get the gist) directories and a keybind for cd .. is more slick. There are cases where you might use pushd . but even then other tooling should already cover your needs.

                It’s also so easy that you can temporarly append to $CDPATH for a specific session. But again, then a second pane or pushd is already available.

                Now downvote me, lemmy.

            • Noxious
              link
              fedilink
              1•8 months ago

              You have to enable it in your shell config. For bash it’s eval "$(zoxide init bash)"

              That will give you the z command.

              https://github.com/ajeetdsouza/zoxide?tab=readme-ov-file#installation

        • @jeffreyosborne@lemm.ee
          cake
          link
          fedilink
          4•8 months ago

          On arch the command is just z

        • @alsimoneau@lemmy.ca
          link
          fedilink
          3•8 months ago

          When you set it up you tell it which command you want. Default is “cdi” but I changed it to “cd” immediately.

    • Jeena
      link
      fedilink
      English
      5•8 months ago

      Hm I wonder, is it really a command? I thought it is just a function of the shell to change the working directory.

      • @ClassifiedPancake@discuss.tchncs.de
        link
        fedilink
        8•8 months ago

        A command is anything you execute in the shell.

        cd is just a built-in command

Asklemmy@lemmy.ml

!asklemmy@lemmy.ml

Subscribe from Remote Instance

Create a post
You are not logged in. However you can subscribe from another Fediverse account, for example Lemmy or Mastodon. To do this, paste the following into the search field of your instance: !asklemmy@lemmy.ml

A loosely moderated place to ask open-ended questions

Search asklemmy 🔍

If your post meets the following criteria, it’s welcome here!

  1. Open-ended question
  2. Not offensive: at this point, we do not have the bandwidth to moderate overtly political discussions. Assume best intent and be excellent to each other.
  3. Not regarding using or support for Lemmy: context, see the list of support communities and tools for finding communities below
  4. Not ad nauseam inducing: please make sure it is a question that would be new to most members
  5. An actual topic of discussion

Looking for support?

  • !lemmy_support@lemmy.ml
  • !fediverse@lemmy.ml
  • !selfhosted@lemmy.world

Looking for a community?

  • Lemmyverse: community search
  • sub.rehab: maps old subreddits to fediverse options, marks official as such
  • !lemmy411@lemmy.ca: a community for finding communities

Icon by @Double_A@discuss.tchncs.de

  • 397 users / day
  • 2.51K users / week
  • 6.95K users / month
  • 19.6K users / 6 months
  • 48K subscribers
  • 7.19K Posts
  • 354K Comments
  • Modlog
  • mods:
  • Evan
  • mekhos
  • tmpod
  • OrangeSlice
  • BE: 0.19.3
  • Modlog
  • Instances
  • Docs
  • Code
  • join-lemmy.org