~edwardloveall/dotfiles

Use diff.algorithm histogram

This looks a lot nicer when moving functions around files.

https://jvns.ca/blog/2024/02/16/popular-git-config-options/#diff-algorithm-histogram
Better iterm detection

I'm not sure why double brackets and space around `==` worked better, but I needed both of them.
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.
Next