A simple shell alias to make portals 🧙
It's a very simple alias that allows you to create alias for your current directory.
Several times we need to go from a different directory path to another as well as when you change the project that you are working, or needs to go working on a very deep directory path.
We make it easy to you with portalize
.
Execute on your shell:
sh -c "$(curl -fsSL https://raw.githubusercontent.com/dapx/portalize/master/install.sh)"
. ~/.portals # Load portals after install, or you can simply start a new shell session.
Create a portal is easy peasy:
cd project/directory
portalize aliasname
After that you can call the alias from any place:
aliasname
And you will be teleported to there.
Call the portals
alias and it will list all portals ordered by creation:
portals
You can also compose with sort
to list all portals ordered by name:
portals | sort
Call the unportalize
alias from any place passing the alias name that you want to remove:
unportalize aliasname
Remove the portal alias file load command from your rc file:
printf "%s\n" "g/^\. ~\/\.portals$/d" w | ed -s ~/.$(basename $SHELL)rc
And if don't want to maintain your portals saved, you can simply remove the ~/.portals
file:
rm ~/.portals