Files
dotfiles/zsh/ruby.zsh
Jim Myhrberg 98f0b2ec66 feat(shell): major refactor around history and completion setup
Biggest change is embracing fzf for all shell completion. This includes
using tmux popup windows to effectively render completions as floating
popups with fuzzy matching via fzf.

Shell history has also been improved, with appending each command to the
history file one by one, rather than only at end of a shell session when
the shell exists. This should ensure I don't have any more lost commands
cause the shell didn't exit cleanly.
2024-05-19 00:08:04 +01:00

76 lines
1.7 KiB
Bash
Executable File

#
# Ruby environment setup.
#
# ==============================================================================
# bundler
# ==============================================================================
# Enable Ruby Bundler plugin from oh-my-zsh.
zinit for @OMZ::plugins/bundler
# ==============================================================================
# aliases
# ==============================================================================
# bundler
alias bch="bundle check"
alias bcn="bundle clean"
alias bco="bundle console"
alias be="bundle exec"
alias bi="bundle_install"
alias bl="bundle list"
alias bo="bundle open"
alias bp="bundle package"
alias bu="bundle update"
# bundle exec wrappers
alias ru="bundle exec ruby"
alias ra="bundle exec rake"
alias rai="bundle exec rails"
alias rs="bundle exec rspec -f doc"
alias cu="bundle exec cucumber"
alias scu="RAILS_ENV=cucumber bundle exec spring cucumber"
# gems
alias po="powify"
alias lu="lunchy"
alias he="heroku"
alias f="foreman"
alias fs="foreman start"
alias fr="foreman run"
# ==============================================================================
# global ruby packages
# ==============================================================================
install_ruby_global_packages() {
local packages=(
'bundler:~> 1.0'
'bundler:~> 2.0'
brakeman
bundler-audit
debase
dotenv
foreman
method_source
pry-doc
reek
rubocop
rubocop-daemon
ruby-debug-ide
ruby-lsp
seeing_is_believing
solargraph
solargraph-rails
steep
syntax_tree
syntax_tree-haml
syntax_tree-rbs
yard
)
gem install --no-document rbenv-rehash
gem install --no-document "${packages[@]}"
}