this post was submitted on 16 Dec 2025
39 points (93.3% liked)

Linux

10668 readers
387 users here now

A community for everything relating to the GNU/Linux operating system (except the memes!)

Also, check out:

Original icon base courtesy of lewing@isc.tamu.edu and The GIMP

founded 2 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
[–] deifyed@lemmy.wtf 6 points 3 days ago (2 children)

Maybe "alias u=cd .." or "alias mkcd=mkdir -p $1 && cd $1"

[–] hallettj@leminal.space 2 points 3 days ago

I like mkcd! I have the same thing. Although what I use more is a function I pair with it that specifically creates a temporary directory, and cds to it. It's useful for temporary work, like extracting from a zip file.

These are my Nushell implementations:

# Create a directory, and immediately cd into it.
# The --env flag propagates the PWD environment variable to the caller, which is
# necessary to make the directory change stick.
def --env dir [dirname: string] {
  mkdir $dirname
  cd $dirname
}

# Create a temporary directory, and cd into it.
def --env tmp [
  dirname?: string # the name of the directory - if omitted the directory is named randomly
] {
  if ($dirname != null) {
    dir $"/tmp/($dirname)"
  } else {
    cd (mktemp -d)
  }
}
[–] deifyed@lemmy.wtf 1 points 3 days ago

Totally forgot my favorites. C=clear, vi=nvim, l=eza -lh