Git 2.28 now has a setting to change the default branch for new
repositories. This sets init.defaultBranch to main and removes the HEAD
file from the git template.
The HEAD file will need to be removed from ~/.git_template manually, as
rcup does not remove deleted files.
https://github.blog/2020-07-27-highlights-from-git-2-28/#introducing-init-defaultbranch
* if .vim/autoload/plug.vim already exists, then use PlugUpgrade to get
the newest version. This should fix#524.
* change from PlugInstall to PlugUpdate which doesn't just install new
plugins but also updates existing ones.
In 16219a31db we implemented a post-up
hook that checked for a problematic `/etc/zshenv` file. OSX/macOS has
changed the file responsible for executing `path_helper` and loading the
system paths multiple times, and this script change issued a warning to
users if `path_helper` might be called in such a way that their paths
could be unexpectedly reordered.
The script used colored output to highlight this problem for the user,
and relied on Bash's script path introspection (through `$BASH_SOURCE`)
to print the location of the `post-up` hook to assist the user in
troubleshooting and understanding where our warning came from.
This change removes the hook's reliance on GNU Bash in favor of `sh`. It
uses the POSIX-compliant `$0` to determine the hook location (this
method is less robust than Bash's `$BASH_SOURCE`, but is available in
all POSIX shells) and removes colored output in the warning to be
compatible with shells that don't support colored output.
Fix#517.
Some tmux users have reported that when running `rcup` that during the
post-up hook Vim would issue errors about input not coming from a
terminal and then the terminal would look and behave unexpectedly.
Running `reset` after the Vim plugin install step in `post-up` appears
to resolve the issue.
Fix#516.
This change prevents the `post-up` hook from breaking the terminal for
the rest of the session when running `rcup`. Since the session is
completely automated, we don't need input from the terminal once Vim
launches.
**Bring executables into better shellcheck compliance**
While evaluating linting and testing options for our shell
configuration, a run of Shellcheck against our executables turned up
some places where we could use more consistent syntax across our
executables, such as always using a shebang or quoting `$HOME` when we
build up a larger directory.
**Update syntax for zsh functions and completions**
A few changes found while linting zsh configs with shellcheck:
* thoughtbot's [style guide] [guide] calls for `$(..)` over backticks
when capturing command output
* use `-gt` to test array length in arguments
[guide]: https://github.com/thoughtbot/guides/tree/master/best-practices
[vim-plug](https://github.com/junegunn/vim-plug) has a number of
advantages over Vundle:
* Installs and updates plugins very quickly in parallel
* Can lock plugins at versions/tags
* Can rollbacks updates (useful if a plugin breaks) and take/reload
snapshots of current state
* Optionally lazily-load plugins when their relevant command is invoked
* Execute post-update hooks for plugins with compiled extensions, etc.
vim-plug uses a DSL very close to Vundle (simplest form is `Plug` vs.
`Plugin`), and here it is set to continue to use the same plugin
location that Vundle was using before.
After updating, users will need to
1. Rename `Plugin` lines in `.vimrc.bundles.local` to use `Plug`
2. Run `:PlugInstall` (the post-up hook does this)
Running `rcup` should remove any plugins that are no longer in use. For
instance, we recently replaced `rename.vim` with `eunuch`. `rcup`
installs the new plugin but does not clean up `rename` from the plugins
directory. The addition of `PluginClean!` does this (without
confirmation).
I wanted to add my own customizations after reading @mike-burns' post on
[`psqlrc`](http://robots.thoughtbot.com/an-explained-psqlrc).
As a result of this change, `.psqlrc` requires that a `.psqlrc.local`
exist in the home folder because `psql` cannot do conditional sourcing
of files in the style that we use in other foundation dotfiles. Touching
the file to ensure it exists (even if blank) prevents `psql` from
exiting with an error if the user does not provide their own custom
configuration.
Additional changes:
* Updating the documentation with regard to which files get excluded.
Previously, the after-up hook would only do a `:BundleInstall` when
installing vundle for the first time. This is inconsistent with the
pre-rcm process, and also less convenient.
The rcm suite is designed to replace the `./install.sh` script found in
this and many other dotfiles repos across GitHub. By using rcm users can
combine multiple dotfiles repos, tag dotfiles, have host-specific
dotfiles, and other powerful features.
This commit removes `install.sh`, updates the README, adds a post-up
hook that vundles the vim bundles, and adds a `rcrc` configuration that
ignores `README.md` and `LICENSE` and sets the dotfiles directory to
just `dotfiles`.