go2 - an opensource tool to quickly change directories using a nickname .config file!
Hey guys!
I'm super new to this so please don't rip me apart if this is stupid or obvious or a usless tool. It helped me and I figured it may help someone else. Either way, I learned some cool stuff while working on it. :)
Background: While working on my school work, I found myself mapping a ton of directory aliases in my .bashrc to get to my various folders quicker (as I'm sure many of you do) and it was just generally making my .bashrc look super ugly. MOST annoyingly though, I kept forgetting what my aliases were a week later so I'd have to vim into my .bashrc and search for the right one.
So I wrote up two simple little bash scripts: nickname and go2.
The goal of these tools are to allow you to create nickname->directory mappings that get stored in a .config/nickname/nickname.config configuration file, cd to them using just their and easily print all of your nickname->directory mappings. Best of all, it clears out a lot of room in your .bashrc!
tldr; Check out the repo and feel free to contribute! I'm a novice and could use the help! https://github.com/ControlxFreak/go2
There are still some open issues but for the most part it works very well for my purposes. Anyone's comments / contributions would be super appreciated!
EDIT: It is now on the AUR!! Sorry for not doing that in the first place :)
Edited 1 Jun 2018. We only hold this version.
About this post
- Posted
- Archived
- Edited
- Score
- 33 · 100% up
- Kind
- Text
- ID
- 8lenpn
14 comments
You can't announce a tool on /r/archlinux without a PKGBUILD! Horrendous!
yes! AUR version when!
"no AUR, time to smear"
I know! I wasn't thinking! giacomogallina and Hades0299 had my back though and helped me get a pkgbuild added (thanks guys) Working through it now.
It is on the AUR now!! :)
You probably want to look at z / j / autojump.
Check out CDPATH.
As someone who also follows r/golang, this post really confused me for a hot second.
Might be unnecessary but could you just use symlinks to common directories?
I have a directory named q in my home folder just for this. I think the main danger is that the symlink might get stored as an absolute path somewhere, rather than the right path. I've never had significant issue though.
Like a folder with all your aliased files? Seems convinient but would require to add this folder to PATH they and will be exposed not only to shell but also to other processes. Why don't grep the file whit the aliases? https://superuser.com/questions/331763/bashrc-loading-aliases-from-different-file
That's not useless at all, I've been using a very similar tool
warp directoryfor a while, to jump into my project folders.Personally i like ranger file manager with marks.
Mark as
m + keyand go to as\+ key`You should try zsh, it has named directories ;)