Bash script that lets you mark a directory, using marco
, and then return to that directory at any time (assuming the user has not overwritten the desired marco) with polo
.
-
Create the local user configuration directory.
mkdir ~/.config/marco
-
Create the local user binary directory.
mkdir ~/bin
-
Clone the contents of the marco-polo repository to the local user binary directory.
git clone --depth=1 https://github.com/rickydodd/marco-polo ~/bin/
-
Remove the
.git
andreadme.md
artefacts.rm -rf ~/bin/{.git,.github,readme.md}
-
Set marco to be sourced with every new bash instance.
echo -e "source ~/bin/marco\n" >> ~/.bashrc
You can restart your terminal emulator or run the command source ~/bin/marco
.
- In a directory you want to mark, run the following command.
marco
- When you want to return to the marked directory, then run the following command.
polo