programming.dev
  • Communities
  • Create Post
  • Create Community
  • heart
    Support Lemmy
  • search
    Search
  • Login
  • Sign Up
cybercitizen4@lemm.ee to Asklemmy@lemmy.ml · 8 个月前

What's a handy terminal command you use often?

message-square
message-square
258
link
fedilink
218
message-square

What's a handy terminal command you use often?

cybercitizen4@lemm.ee to Asklemmy@lemmy.ml · 8 个月前
message-square
258
link
fedilink
  • emb@lemmy.world
    link
    fedilink
    arrow-up
    45
    ·
    8 个月前

    I really like that cd command. :P

    • unknowing8343@discuss.tchncs.de
      link
      fedilink
      arrow-up
      20
      ·
      8 个月前

      You’ll love zoxide then.

      • LalSalaamComrade@lemmy.ml
        link
        fedilink
        English
        arrow-up
        5
        arrow-down
        5
        ·
        edit-2
        7 个月前

        deleted by creator

        • Yoddel_Hickory@lemmy.ca
          link
          fedilink
          arrow-up
          22
          arrow-down
          1
          ·
          8 个月前

          The command is ‘z’

          • LalSalaamComrade@lemmy.ml
            link
            fedilink
            English
            arrow-up
            8
            arrow-down
            1
            ·
            edit-2
            7 个月前

            deleted by creator

            • unknowing8343@discuss.tchncs.de
              link
              fedilink
              arrow-up
              5
              ·
              8 个月前

              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
                arrow-up
                3
                arrow-down
                2
                ·
                8 个月前

                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@fedia.io
              link
              fedilink
              arrow-up
              1
              ·
              8 个月前

              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
          link
          fedilink
          arrow-up
          4
          ·
          8 个月前

          On arch the command is just z

        • alsimoneau@lemmy.ca
          link
          fedilink
          arrow-up
          3
          ·
          8 个月前

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

    • Jeena@piefed.jeena.net
      link
      fedilink
      English
      arrow-up
      6
      arrow-down
      1
      ·
      8 个月前

      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
        arrow-up
        8
        ·
        8 个月前

        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: [email protected]

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?

  • [email protected]
  • [email protected]
  • [email protected]

Looking for a community?

  • Lemmyverse: community search
  • sub.rehab: maps old subreddits to fediverse options, marks official as such
  • [email protected]: a community for finding communities

Icon by @[email protected]

Visibility: Public
globe

This community can be federated to other instances and be posted/commented in by their users.

  • 494 users / day
  • 2.38K users / week
  • 6.27K users / month
  • 18.4K users / 6 months
  • 592 local subscribers
  • 48.3K subscribers
  • 7.18K Posts
  • 359K Comments
  • Modlog
  • mods:
  • Evan@lemmy.ml
  • mekhos@lemmy.ml
  • tmpod@lemmy.pt
  • OrangeSlice@lemmy.ml
  • BE: 0.19.11
  • Modlog
  • Legal
  • Instances
  • Docs
  • Code
  • join-lemmy.org