executivechimp,
@executivechimp@discuss.tchncs.de avatar

Good article. Rather than aliasing `cd …/…" etc. I’ve got this function in my setup:


<span style="color:#323232;">up () {
</span><span style="color:#323232;">	local x='' 
</span><span style="color:#323232;">	for i in $(seq ${1:-1})
</span><span style="color:#323232;">	do
</span><span style="color:#323232;">		x="$x../" 
</span><span style="color:#323232;">	done
</span><span style="color:#323232;">	cd $x
</span><span style="color:#323232;">}
</span>

This lets me do up 4 to go up 4 directories.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • linux@lemmy.ml
  • localhost
  • All magazines
  • Loading…
    Loading the web debug toolbar…
    Attempt #