Pricefield | Lemmy
  • Communities
  • Create Post
  • Create Community
  • heart
    Support Lemmy
  • search
    Search
  • Login
  • Sign Up
@[email protected] to [email protected] • 2 months ago

That is the way

sub.wetshaving.social

message-square
144
fedilink
930

That is the way

sub.wetshaving.social

@[email protected] to [email protected] • 2 months ago
message-square
144
fedilink
alert-triangle
You must log in or register to comment.
  • Fushuan [he/him]
    link
    fedilink
    1•2 months ago

    Sometimes I have to swap between two routed for several things, so I create a quick in-memory alias like aa=$(pwd)

    Then I can cd $aa

  • @[email protected]
    link
    fedilink
    English
    4•
    edit-2
    2 months ago

    Why no cd /////// speceficterm if you know how deep it is

    Those are supposed to be stars. I’m not fixing this on a phone

  • @[email protected]
    link
    fedilink
    5•
    edit-2
    2 months ago

    Honestly I haven’t tried this on Linux yet, but didn’t Windows implement this somewhere along the way?..

    cd ....

    • @[email protected]
      link
      fedilink
      9•
      edit-2
      2 months ago

      Windows be like

      cd …

      ls

      grumble grumble

      dir

      • @[email protected]
        link
        fedilink
        1•
        edit-2
        2 months ago

        Wanna fix that real quick?

        echo @dir %1 %2 %3 %4>%SystemRoot%\System32\ls.bat

    • vortic
      link
      fedilink
      5•
      edit-2
      2 months ago

      I aliased cd to a custom funtion in my bashrc to do this at one point, but cd ../../../.. is too engrained so I never rembered to use it.

      • @[email protected]
        link
        fedilink
        4•2 months ago

        You will probably like zoxide (i am not sure about policy on links here, but here you go https://github.com/ajeetdsouza/zoxide)

        • @[email protected]
          link
          fedilink
          4•2 months ago

          Zoxide is nice, or use Yazi so you can actually see where you’re going.

          • Eyedust
            link
            fedilink
            English
            1•2 months ago

            Yazi, Superfile, Midnight Commander (my favorite), or Ranger. I’m sure there’s more, but those are the ones I know.

    • Ephera
      link
      fedilink
      English
      7•2 months ago

      I believe, zsh supports that.

      • @[email protected]
        link
        fedilink
        5•2 months ago

        Interesting, I might have to check that out someday.

        Though when I write scripts, I’m not a fan of blind folder navigation like that, there’s a good reason for the pushd and popd script commands.

        • Ephera
          link
          fedilink
          English
          2•2 months ago

          Oh yeah, I wouldn’t use that for scripts. I wouldn’t use zsh for scripts either.
          I mean, I believe, it’s generally compatible with bash, but just throwing a shebang like #!/bin/sh or #!/bin/bash into the first line of the script will make it execute with sh or bash, even when you run it from zsh.

  • @[email protected]
    link
    fedilink
    6•2 months ago

    I’ve used a script that made ‘up 4’ a thing. Forgot to migrate it though.

    • @[email protected]
      link
      fedilink
      English
      8•2 months ago

      Biggest issue I have with custom macros is I’m logging into like 5 different machines a day. Don’t wanna keep copying over my custom bash files. Prefer built-in commands.

      • @[email protected]
        link
        fedilink
        2•2 months ago

        Yeah, I get that. But I’m traversing my machine a lot while developing, so I want that as hassle free as possible.

      • LiveLM
        link
        fedilink
        English
        1•2 months ago

        Me too. Would love a tool that allows me to have bells and whistles on my remote machines without having to install extra packages on them.

    • @[email protected]
      link
      fedilink
      4•2 months ago

      Heyy I have that in my .bashrc
      Works a charm

      • @[email protected]
        link
        fedilink
        2•2 months ago

        Had it in my .zshrc. I should look for it, it was helpful

  • @[email protected]
    link
    fedilink
    English
    31•2 months ago

    Depending on where you are, maybe just “cd”.

    • Midnight Wolf
      link
      fedilink
      English
      12•2 months ago

      Smh when are you going to upgrade to dvd

  • @[email protected]
    link
    fedilink
    5•2 months ago

    The history of the CTO at a previous job was filled with dc and sl because he was a fucking moron. Yes I’m still bitter that he earned way more money than me who had to fix all his mess.

    • @[email protected]
      link
      fedilink
      7•2 months ago

      You could have gifted him some silly fun with the sl package.

  • @[email protected]
    link
    fedilink
    57•
    edit-2
    2 months ago

    cd ..
    ⭡ ⏎
    ⭡ ⏎
    ⭡ ⏎

    • furry toaster
      link
      fedilink
      English
      7•2 months ago

      square

    • @[email protected]
      link
      fedilink
      12•2 months ago

      Oh, shit.

  • @[email protected]
    link
    fedilink
    Íslenska
    30•2 months ago

    cd … ls cd … ls cd … ls cd … ls

  • @[email protected]
    link
    fedilink
    English
    6•
    edit-2
    2 months ago
    ~$ mkdir -p 1/2/3/4
    ~$ pushd 1
    ~/1 ~
    1$ pushd 2/3/4
    ~/1/2/3/4 ~/1 ~
    4$ popd
    ~/1 ~
    1$
    
  • @[email protected]
    link
    fedilink
    1•2 months ago

    https://www.gnu.org/software/bash/manual/html_node/Bourne-Shell-Builtins.html#index-cd

    TIL about $CDPATH may have to populate that!

  • billwashere
    link
    fedilink
    English
    18•
    edit-2
    2 months ago

    Or the alias I have set up

    ……

    • @[email protected]
      link
      fedilink
      English
      1•2 months ago

      Once you’ve typed … you know if you type more dots it’s to go up more dir, so you don’t really need two dots for each additional dir.

      • billwashere
        link
        fedilink
        English
        1•2 months ago

        Yeah so it was five dots for four directories up. I also have

        … for 2

        And

        …. for 3

        I don’t think I have one for 5. I’d have to look. I also use autojump and fzf which is very useful.

    • @[email protected]
      link
      fedilink
      9•2 months ago

      I kept saying “cd up” in my mind so I just made an alias for cdu, became a reflex within the next day

    • AtHeartEngineer
      link
      fedilink
      English
      1•2 months ago

      Ya, this is the way. I use ... all the time

  • funkajunk
    link
    fedilink
    English
    26•2 months ago

    I alias .. to cd ..

    Works for me 🤷🏻

    • @[email protected]
      link
      fedilink
      2•2 months ago

      I feel like thats eventually going to case problems when you run a script…

    • @[email protected]
      link
      fedilink
      21•2 months ago

      I do that too!
      I also alias ... to cd ../... I’ll be honest, I often forget to do it, but in theory it can speed things up.

  • @[email protected]
    link
    fedilink
    5•2 months ago

    Wait until we tell them about autojump

  • @[email protected]
    link
    fedilink
    2•
    edit-2
    2 months ago

    cd ./…
    cd …/._

  • @[email protected]
    link
    fedilink
    English
    9•2 months ago

    Tbf it is less key presses since you can generally just recall the last command.

[email protected]

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

Hint: :q!


Sister communities:
  • [email protected]
  • [email protected]
  • [email protected]
  • [email protected]

Community rules (click to expand)

1. Follow the site-wide rules
  • Instance-wide TOS: https://legal.lemmy.world/tos/
  • Lemmy code of conduct: https://join-lemmy.org/docs/code_of_conduct.html
2. Be civil
  • Understand the difference between a joke and an insult.
  • Do not harrass or attack users for any reason. This includes using blanket terms, like “every user of thing”.
  • Don’t get baited into back-and-forth insults. We are not animals.
  • Leave remarks of “peasantry” to the PCMR community. If you dislike an OS/service/application, attack the thing you dislike, not the individuals who use it. Some people may not have a choice.
  • Bigotry will not be tolerated.
3. Post Linux-related content
  • Including Unix and BSD.
  • Non-Linux content is acceptable as long as it makes a reference to Linux. For example, the poorly made mockery of sudo in Windows.
  • No porn, no politics, no trolling or ragebaiting.
4. No recent reposts
  • Everybody uses Arch btw, can’t quit Vim, <loves/tolerates/hates> systemd, and wants to interject for a moment. You can stop now.
5. 🇬🇧 Language/язык/Sprache
  • This is primarily an English-speaking community. 🇬🇧🇦🇺🇺🇸
  • Comments written in other languages are allowed.
  • The substance of a post should be comprehensible for people who only speak English.
  • Titles and post bodies written in other languages will be allowed, but only as long as the above rule is observed.
6. (NEW!) Regarding public figures

We all have our opinions, and certain public figures can be divisive. Keep in mind that this is a community for memes and light-hearted fun, not for airing grievances or leveling accusations.

  • Keep discussions polite and free of disparagement.
  • We are never in possession of all of the facts. Defamatory comments will not be tolerated.
  • Discussions that get too heated will be locked and offending comments removed.

 

Please report posts and comments that break these rules!


Important: never execute code or follow advice that you don’t understand or can’t verify, especially here. The word of the day is credibility. This is a meme community – even the most helpful comments might just be shitposts that can damage your system. Be aware, be smart, don’t remove France.

  • 1 user / day
  • 169 users / week
  • 978 users / month
  • 4.67K users / 6 months
  • 4 subscribers
  • 1.74K Posts
  • 94.9K Comments
  • Modlog
  • mods:
  • Kevin
  • @[email protected]
  • @[email protected]
  • UI: 0.18.4
  • BE: 0.18.2
  • Modlog
  • Instances
  • Docs
  • Code
  • join-lemmy.org