~edwardloveall/dotfiles

Add local_caller method

Sometimes you want a stack trace of what chain of methods invoked
wherever you are right now. `caller` does this, but it also includes
things like library and irb/pry frames in the stack. Often what I want
is the stack frames from whatever code is in the current code base.

`local_caller` uses the current directory as a proxy for "current code
base". It `select`s the frames that contain `Dir.pwd` which leaves us
with a nice, small stack trace.

This is on `Kernel` so it can be uses anywhere.
Add pbcopy

This will copy any string to my macOS clipboard:

```rb
some_large_sql_string.pbcopy
```

It works by creating a new output stream that pipes directly into the
`pbcopy` command using `IO.popen`. `popen` stands for "pipe open" and is
similar to the standard C `popen(3)` function. Imagine it's just like
`$stdout` but you can attach a command to it really easily.

It invokes `popen` with a block and simply `puts` the string into it.
Using a block argument automatically closes the IO.

Big shoutout to the Avdi Grimm and his https://graceful.dev/ videos for
teaching me about open pipe (which looks like `open("|command")`
instead), and postmodern for teaching me that `popen` is the better
choice because it shows more intention than `open("|command")`:
https://bugs.ruby-lang.org/issues/19630
Clean up postgres config

Timing and auto output was annoying. I also moved the history from the home folder to ~/.config/psql
Turn off autocomplete in irb
Use included script in asdf golang

This got merged so now I don't have to use my own script:

https://github.com/kennyp/asdf-golang/pull/56
Add git switch alias
Alphabetize install directories
Set GOROOT to asdf install location

GOROOT it where the go language is installed. Multiple go installations (like multiple versions) should have different GOROOTs. This sets GOROOT to the asdf install directory.

I also run into a lot of documentation about GOPATH. Since go 1.11, GOPATH is [no longer needed](https://stackoverflow.com/a/53026674/638966). I think this is because go can now use the current directory by default.

## References

https://golangr.com/what-is-gopath/
https://golang.co/difference-between-gopath-and-goroot/
https://www.jetbrains.com/help/go/configuring-goroot-and-gopath.html
https://go.dev/doc/code
Add local override zshrc
Fix pkg_config path

It was pointing to a directory that doesn't exist and causing problems with crystal
Disable bindkey "^R" to fix fzf

fzf history search was not working because I was overwriting the ^R keybinding with:

```
bindkey "^R" history-incremental-search-backward
```

Commenting that out made it work again.
Add g as alias for gitui
Pass -a to exa

With my previous `ll` alias, I passed the -a flag to show all files
including hidden. I missed seeing those so I'm adding it back.
Rework paths, again

Puts homebrew paths before the system paths. This ensures that homebrew packages take precedence over system ones.
Add vim/dot-vim/.netrwhist to gitignore
Rework $PATHs

The motivation here was to get `.git/safe/../../bin` before asdf paths so local project commands go before global ones. This also gave me an excuse to organize and clarify my path setup.
Remove custom psql PATH

This was from when I installed Postgres via homebrew. Now I use Postgres.app which adds to the PATH from /etc/paths.d: https://postgresapp.com/documentation/cli-tools.html
Next