Do all the things like ++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatarSign Up
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple APILearn More
baewulf20412y(I’m new to bash) what’s the diff between cd and tp?
@baeovvulf cd changes the directory. You can use it with absolute and with relative paths.
Say you are currently in the dir ~/Documents/oof/rab and want to switch to ~/Desktop/foo/bar. What you can do is to call cd like this:
Or like this:
I created tp because I think that this is too much work to simply switch to the bar-folder. Therefore, my tool allows you to store a short name, called portal, with the corresponding directory.
In this case, I would create a portal called 'bar' that points to the directory ~/Desktop/foo/bar. This allows me to simply call
which then teleports me directly to this folder from wherever I currently am located. It comes in handy when you need to switch to a certain folder on a regular basis
@baeovvulf tp is a command we invented. You can use it to quickly cd to a directory that you often use, without having to write the full path.
Edit: what ruhe just said while I was typing
How does it work out what the correct path would be if I have several /bar folders under /foo/bar /cup/bar /trog/bar etc?
Nevermind I see its git was linked ...
benj8042ytp sounds like fasd... No?
gruff6222yOr alias src=~/projects/src
just discovered the cd - command
cd - // changes to foo
cd - // changes to bar
cd - // changes to foo again, ad so on.
this would be enough for me ... if I don't open a tab for every directory I need anyway.
would it be enough for you?