LemmyBun
  • Communities
  • Create Post
  • Create Community
  • heart
    Support Lemmy
  • search
    Search
  • Login
  • Sign Up
weird@sub.wetshaving.social to linuxmemes@lemmy.world · 7 days ago

That is the way

sub.wetshaving.social

message-square
146
link
fedilink
908

That is the way

sub.wetshaving.social

weird@sub.wetshaving.social to linuxmemes@lemmy.world · 7 days ago
message-square
146
link
fedilink
alert-triangle
You must log in or register to comment.
  • bitchkat@lemmy.world
    link
    fedilink
    English
    arrow-up
    14
    ·
    5 days ago

    You forgot the pwd after each ‘cd’.

    • Owl@mander.xyz
      link
      fedilink
      arrow-up
      2
      ·
      5 days ago

      ls*

      • bitchkat@lemmy.world
        link
        fedilink
        English
        arrow-up
        1
        ·
        5 days ago

        Ls doesn’t tell them where they are, just what files exist in their current location.

        • Owl@mander.xyz
          link
          fedilink
          arrow-up
          3
          ·
          5 days ago

          Yup,

          But I want to know if the file I’m looking for is in this directory or I have to cd… once more

          • bitchkat@lemmy.world
            link
            fedilink
            English
            arrow-up
            2
            ·
            5 days ago

            That’s when locate piped to grep is your best friend.

  • lemmyhavesome@lemmy.world
    link
    fedilink
    arrow-up
    55
    arrow-down
    1
    ·
    edit-2
    7 days ago
    In your rc:
    alias ..='cd ..'
    alias ...='cd ../..'
    alias ....='cd ../../..'
    
    Usage:
    1/2/3 $ ...
    1 $
    
    • /home/pineapplelover@lemm.ee
      link
      fedilink
      arrow-up
      12
      ·
      7 days ago

      That’s pretty neat

    • petersr@lemmy.world
      link
      fedilink
      arrow-up
      3
      ·
      7 days ago

      This is the way.

    • marx2k@lemmy.world
      link
      fedilink
      arrow-up
      4
      arrow-down
      1
      ·
      7 days ago

      Or just use zsh

      • Matriks404@lemmy.world
        link
        fedilink
        arrow-up
        4
        ·
        6 days ago

        Yeah, let’s use whole different shell, because you can’t add some few aliases to your .bashrc.

        • marx2k@lemmy.world
          link
          fedilink
          arrow-up
          6
          ·
          6 days ago

          That’s not why I use a whole different shell. It just happens to be a perk of the one I use.

  • wpb@lemmy.world
    link
    fedilink
    arrow-up
    44
    ·
    edit-2
    7 days ago

    ..... for zsh users

    • karmiclychee @sh.itjust.works
      link
      fedilink
      arrow-up
      35
      ·
      7 days ago

      Excuse me what? I’ve been multi cd’ing for years like a chump?

      • beeng@discuss.tchncs.de
        link
        fedilink
        arrow-up
        10
        ·
        7 days ago

        Exactly. The fucking what now?

        • grrgyle@slrpnk.net
          link
          fedilink
          arrow-up
          1
          ·
          5 days ago

          Doesn’t work on my machine… is it a setting that needs to be enabled or something?

          • beeng@discuss.tchncs.de
            link
            fedilink
            arrow-up
            1
            ·
            5 days ago

            Same. I LLMd it and said it needs aliasing so not sure what these users are saying now actually.

  • Matriks404@lemmy.world
    link
    fedilink
    arrow-up
    29
    ·
    edit-2
    6 days ago
    alias cd..='cd ..'
    alias cd...='cd ../..'
    alias cd....='cd ../../..
    alias cd.....='cd ../../../..'
    
    • AA5B@lemmy.world
      link
      fedilink
      arrow-up
      6
      ·
      6 days ago

      Then forget all that and just use

      cd ~ or cd /

      • NostraDavid@programming.dev
        link
        fedilink
        arrow-up
        2
        ·
        5 days ago

        No need for ~ - just cd works as well.

  • some_guy@lemmy.sdf.org
    link
    fedilink
    arrow-up
    8
    ·
    5 days ago
    alias ..='cd ..' #: up one directory
    alias ...='cd ../..' #: up two directories
    
    • NostraDavid@programming.dev
      link
      fedilink
      arrow-up
      2
      ·
      5 days ago

      The first two options (autocd and cdspell) have been a lifesaver in fixing my frustrations with the default bash settings (and even lets me stick with bash, instead of feeling I should move to zsh or any other shell.

      I can just type a foldername, tabcomplete it and press enter to go there. It’s great.

      # == shopts ==
      # https://www.gnu.org/software/bash/manual/html_node/The-Shopt-Builtin.html
      shopt -s autocd         # cd into folder without cd, so 'dotfiles' will cd into the folder
      shopt -s cdspell        # attempt spelling correcting on folders
      shopt -s direxpand      # expand a partial dir name
      shopt -s checkjobs      # stop shell from exit when there's jobs running
      shopt -s dirspell       # attempt spelling correcting on folders
      shopt -s expand_aliases # aliases are expanded
      shopt -s histappend     # append to the history file, don't overwrite it
      shopt -s histreedit     # lets your re-edit old executed command
      shopt -s histverify     # I'm confused.
      shopt -s hostcomplete   # performs completion when a word contains an '@'
      shopt -s cmdhist        # save multiple-line command in single history entry
      shopt -u lithist        # multi-lines are saved with embedded newlines rather than semicolons; explictly unset
      shopt -s checkwinsize # update LINES and COLUMNS to fit output
      
  • Naich@lemmings.world
    link
    fedilink
    arrow-up
    24
    ·
    7 days ago

    for i in { 1…4 }; do cd …; done

  • zitrone 🍋@lemmings.world
    link
    fedilink
    arrow-up
    16
    ·
    7 days ago

    i use fish shell with https://github.com/nickeb96/puffer-fish

    basically when i type ... it expands to ../.. and adds another /.. for every additional dot i type

    its similar to what the zsh users in the comment section are doing

    • oni ᓚᘏᗢ@lemmy.world
      link
      fedilink
      arrow-up
      2
      ·
      edit-2
      6 days ago

      I was about to post something similar. With fish you can do your own functions, right? So, you can pass any dots as arguments to a function called cd, so, for every extra dot after .., you append a /.. at the end.

      • zitrone 🍋@lemmings.world
        link
        fedilink
        arrow-up
        1
        ·
        edit-2
        6 days ago

        yeah, but its less visual

        cd ..... is harder to understand than cd ../../../..

        also the extension work with any commend, not just cd

    • Matriks404@lemmy.world
      link
      fedilink
      arrow-up
      1
      ·
      6 days ago

      deleted by creator

  • beerclue@lemmy.world
    link
    fedilink
    arrow-up
    16
    ·
    7 days ago

    I use a lot cd - (go to previous) or just cd to go home.

  • axEl7fB5@lemmy.cafe
    link
    fedilink
    English
    arrow-up
    11
    ·
    7 days ago
    cd ..
    !!
    !!
    !!
    
  • MoogleMaestro@lemmy.zip
    link
    fedilink
    English
    arrow-up
    8
    ·
    6 days ago
    cd .. && ls
    !!
    !!
    !!
    !!
    
    • grrgyle@slrpnk.net
      link
      fedilink
      arrow-up
      3
      ·
      5 days ago

      What’s so surprising?? What did you see in that dir??

      • NostraDavid@programming.dev
        link
        fedilink
        arrow-up
        2
        ·
        5 days ago

        Double-bang repeats the previous command. Great if you forget sudo.

        $ rm -rf <folder>
        permission denied
        $ sudo !!
        
        • grrgyle@slrpnk.net
          link
          fedilink
          arrow-up
          1
          ·
          5 days ago

          Haha yeah I was just being silly

  • technotony@sh.itjust.works
    link
    fedilink
    arrow-up
    5
    ·
    6 days ago

    Easiest solution, use fish instead of bash! Default fish keybindings will allow you to just type . . or name a directory similar to how you could do with Zoxide.

    Also, wait until you find about pushd and popd ;)

    • sleet01@lemmy.ca
      link
      fedilink
      arrow-up
      1
      ·
      edit-2
      5 days ago

      Really buried the lede there: pushd and popd are what I use instead of cd most times!

  • λλλ@programming.dev
    link
    fedilink
    arrow-up
    14
    arrow-down
    1
    ·
    7 days ago

    cd ..... I use zsh btw

    • jia_tan@lemmy.blahaj.zone
      link
      fedilink
      English
      arrow-up
      4
      ·
      7 days ago

      Whaaaaaaaaaaaaaaat

    • Pup Biru@aussie.zone
      link
      fedilink
      English
      arrow-up
      3
      ·
      edit-2
      7 days ago

      don’t even need the cd since if it’s a dir, zsh automatically cd to that path ;)

      just ….. works great

      • λλλ@programming.dev
        link
        fedilink
        arrow-up
        1
        ·
        7 days ago

        I didn’t know that. Thanks!

  • SchwertImStein@lemmy.dbzer0.com
    link
    fedilink
    English
    arrow-up
    8
    ·
    7 days ago
    .....
    
  • hperrin@lemmy.ca
    link
    fedilink
    English
    arrow-up
    9
    ·
    7 days ago

    alias .4=cd …/…/…/…

    • ziggurat@lemmy.world
      link
      fedilink
      arrow-up
      2
      ·
      7 days ago

      alias -g .4=“…/…/…/…”

  • demunted@lemmy.ml
    link
    fedilink
    arrow-up
    5
    ·
    6 days ago

    cd …/…

linuxmemes@lemmy.world

linuxmemes@lemmy.world

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: !linuxmemes@lemmy.world

Hint: :q!


Sister communities:
  • !tech_memes@lemmy.world
  • !memes@lemmy.world
  • !lemmyshitpost@lemmy.world
  • !risa@startrek.website

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.

Visibility: Public
globe

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

  • 368 users / day
  • 5.07K users / week
  • 9.28K users / month
  • 16.8K users / 6 months
  • 1 local subscriber
  • 25.2K subscribers
  • 706 Posts
  • 19.3K Comments
  • Modlog
  • mods:
  • zephyr@lemmy.world
  • rtxn@lemmy.world
  • BE: 0.19.11
  • Modlog
  • Instances
  • Docs
  • Code
  • join-lemmy.org