Skip to content

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.

33 points14 comments
Open on Reddit
About this post
Posted
Archived
Edited
Score
33 · 100% up
Kind
Text
ID
8lenpn

Author

8
posts
26
comments
1
media
View profile

14 comments

You can't announce a tool on /r/archlinux without a PKGBUILD! Horrendous!

28 points

As someone who also follows r/golang, this post really confused me for a hot second.

5 points

Might be unnecessary but could you just use symlinks to common directories?

3 points

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.

1 points

Personally i like ranger file manager with marks.

Mark as m + key and go to as \ + key`

2 points

You should try zsh, it has named directories ;)

2 points

Keyboard shortcuts

Move and act

jork
Next / previous post or comment
Enteroro
Open the post
f
Open the media viewer
s
Save
h
Hide (the toast has Undo)
Tab
Right after an action: the toast's Undo
x
Collapse the comment
v
Next layout: cards, compact, grid

Go to

/
Search
gthenh
Home
gthena
All
gthens
Subreddits
gthenl
Library
?
This list
Esc
Close a menu or this list

In the viewer

←or→
Previous / next file
↑or↓
Previous / next post
korj
Previous / next post
Space
Play / pause
m
Mute
z
Zoom
s
Save
o
Open the post (on its own page: back to it)
Esc
Close

Keys do nothing while you type in a box.