Commit graph

14 commits

Author SHA1 Message Date
Frank Loesche
d6014c3a60 fix #524, update plugins
* 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.
2017-08-25 15:23:25 -04:00
Geoff Harcourt
06197218c7 Don't rely on Bash in post-up hook
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.
2017-05-08 16:06:01 -04:00
Geoff Harcourt
336a282602 Run reset in post-up hook to fix terminal issue
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.
2017-04-28 16:31:25 -04:00
Geoff Harcourt
2fa36ccf9d Revert "Explicitly specify no input from terminal in post-up hook"
This reverts commit 99a18f6dbe.

Users reported problems after this change, so I'm pulling it.
2017-01-24 10:39:58 -05:00
Geoff Harcourt
99a18f6dbe Explicitly specify no input from terminal in post-up hook
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.
2017-01-19 18:04:14 -05:00
Geoff Harcourt
21830dd035 Bring more shell syntax into shellcheck compliance
**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
2015-10-30 12:50:02 -04:00
Mislav Marohnić
901faec464 Only colorize warning messages if stderr is a tty
This is to avoid outputting ANSI escape codes to scripts and log files.
2015-10-23 12:26:11 -04:00
Mislav Marohnić
16219a31db Move broken OS X /etc/zshenv detection to post-up hook
This is so it doesn't run every time when zsh starts in interactive
mode, but just once per `rcup`.
2015-10-23 12:26:11 -04:00
Geoff Harcourt
5724d124a5 Use vim-plug over vundle
[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)
2015-04-27 19:14:22 -04:00
Derek Prior
b4b9168b19
Remove unused plugins after rcup
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).
2014-10-01 09:37:30 -04:00
Geoff Harcourt
9a2cb782b1
Allow personal overrides to psqlrc
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.
2014-07-30 10:46:25 +02:00
Robert Speicher
0191762805 Update for Vundle's new interface
* Vundle now lives at gmarik/Vundle.vim

See https://github.com/gmarik/Vundle.vim/blob/master/doc/vundle.txt#L345-L369
2014-07-25 17:20:57 -07:00
Mike Burns
3acd933e68
Always update from vundle
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.
2013-12-05 10:27:16 +01:00
Mike Burns
3bc2a98a1b Use rcm instead of ./install.sh
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`.
2013-12-05 10:17:12 +01:00