ro_commands.sh in ro_commands-0.0.3 vs ro_commands.sh in ro_commands-0.0.4
- old
+ new
@@ -3,28 +3,212 @@
lib="$HOME/Dropbox/utils/lib"
learn="$HOME/Dropbox/learn"
ruby_projects="$HOME/Dropbox/ruby-projects"
js_java_projects="$HOME/Dropbox/js-java-projects"
work_project="$ruby_projects/ro_partner"
-alias ro="bundle exec ro"
+RUBYMINE_HOME="~/Dropbox/RubyMine"
+alias ro="/home/zxr/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/ro_commands-0.0.3/bin/ro"
alias ro_client="/home/zxr/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/ro_commands-0.0.3/bin/ro_client"
alias ro_server="/home/zxr/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/ro_commands-0.0.3/bin/ro_server"
+alias list="ro_client info list ."
+alias guard="bundle exec guard "
+alias bx="bundle exec"
+
+alias goagenthosts="ro_client crawler get_hosts_for_goagent"
+
+
+alias dbc="zeus rake db:create"
+alias railsnewapp="ro generate rails_new_app"
+alias de="zeus g decorator"
+alias zro="zeus ro"
+
+function mi() {
+ zeus rake db:migration
+ zeus rake test:prepare
+}
+
+
+alias sp="smplayer"
+alias record="recordmydesktop --no-sound --overwrite -o"
+alias ad="avidemux --output-format AVI"
+
+alias work="bundle exec ro shortcuts work"
+
+alias e=rerun_debug
+#function rerun_debug() {
+# eval $(xdotool getmouselocation --shell)
+# xdotool key F10
+# xdotool mousemove 14 558
+# xdotool click 1
+# xdotool click 1
+# xdotool key --delay 200 ctrl+F5
+# xdotool mousemove $X $Y
+#}
+
+alias ga='git add'
+alias gaa='ga .'
+alias gb='git branch'
+alias gco='git checkout'
+alias gc='git commit -am'
+alias gi='git add -i'
+alias gl='git log --oneline --all --color --graph --decorate'
+alias gm='git merge'
+alias gp='git push -u origin master'
+alias gst='git status'
+alias gupdatesubmodule="git submodule foreach git pull origin master"
+alias gh="github"
+
+
+alias navigate="ro_client navigate"
+#idea
+alias i='idea `pwd`'
+
+#rubymine
+alias r='rubymine `pwd`'
+alias libspec="ro shortcuts lib_spec"
+alias rbm="rubymine"
+
+function cd_path() {
+echo "opening $1"
+cd "$1"
+}
+
+function rubymine_open_path() {
+cd_path "$1"
+rubymine .
+}
+
+function idea_open_path() {
+cd_path "$1"
+idea .
+}
+
+
+cdir () {
+path=`ro_client navigate get_dir $1`
+cd_path "$path"
+}
+
+odir () {
+cdir $1
+rubymine .
+}
+
+# cd to project path
+cpj () {
+path=`ro_client navigate get_project $1`
+cd_path "$path"
+}
+
+pj () {
+cpj $1
+rubymine .
+}
+
+cjpj () {
+path=`ro_client navigate get_project $1 java`
+echo "cd $path"
+cd "$path"
+}
+
+jpj () {
+path=`ro_client navigate get_project $1 java`
+idea_open_path "$path"
+}
+
+function csub() {
+path=`navigate get_submodule $1`
+cd_path $path
+}
+
+function sub() {
+csub $1
+rubymine .
+}
+
+function roadmap() {
+path=`navigate get_roadmap $1`
+rubymine_open_path "$path"
+}
+
+alias rco="ro shortcuts open_ro_commands"
+alias rsu="ro shortcuts open_ro_support"
+
+
+alias unzip="ro misc unzip"
+alias rn="ro file_actions rename"
+alias f="ro file_actions find"
+alias cddownloads="cd ~/Dropbox/Downloads"
+
+#gist
+alias note='bundle exec ro ro_gist upload'
+alias deprecate='bundle exec ro ro_gist deprecate'
+
+#mysql
+alias mysqlrestart="sudo service mysql restart"
+alias mysql="mysql -uroot"
+
+#process
+alias pkillf="sudo pkill -f"
+#grep
+alias psgrep="ps aux | grep"
+alias aliasgrep="alias | grep"
+alias pgrepf="pgrep -f"
+
+alias spec="ro generate spec_file"
+alias ex="ro generate ex"
+alias dl="cd ~/Downloads"
+alias sshproxy="sudo service ssh-proxy restart"
+alias roserver="sudo service ro_server"
+
+# cd to dir
+alias rp="cd ~/Dropbox/ruby-projects"
+
+alias dp="cd $HOME/Dropbox"
+
+# js java project
+alias jp="cd $js_java_projects"
+
+alias fas="ro_client file_actions"
+alias rps="ro_client ro_procs"
+alias rclocal="sudo rubymine /etc/rc.local"
+alias wp='working_project'
+
+alias work_project="cd $work_project"
+alias l="cd $learn"
+
+#find railscasts
+alias rc="ro_client file_actions find_railscasts"
+
+# reload ~/bashrc.erb
+alias rb="source ~/.bashrc"
+
+sock_proxy="socks5://127.0.0.1:1080"
+alias proxy="http_proxy=$sock_proxy"
+
+alias jk="jekyll"
+alias jks="jekyll server"
+
+
+
alias z='zeus'
- alias zr='z rails'
+ alias zr='zeus rails'
alias g='z g'
alias d='z d'
alias zs='z s'
+ alias zk='zeus rake'
+
alias a='z g assets'
- alias c='zr controller'
+ alias c='z g controller'
alias m='zr migration'
alias mo='zr model'
@@ -38,16 +222,14 @@
alias dm='d migration'
alias ds='d scaffold'
- alias mi='z rake db:migrate'
- alias bx='bundle exec'
+
-
@@ -68,11 +250,11 @@
_da () {
local cur options command commands
_get_comp_words_by_ref cur
- commands=$(ro_client rails get_assets)
+ commands=$(zr get_assets)
local cur="${COMP_WORDS[$COMP_CWORD]}"
if [ -z "($commands)" ]; then
echo '' >> /dev/null
else
@@ -85,11 +267,11 @@
_dco () {
local cur options command commands
_get_comp_words_by_ref cur
- commands=$(ro_client rails get_controllers)
+ commands=$(zr get_controllers)
local cur="${COMP_WORDS[$COMP_CWORD]}"
if [ -z "($commands)" ]; then
echo '' >> /dev/null
else
@@ -102,11 +284,11 @@
_dmo () {
local cur options command commands
_get_comp_words_by_ref cur
- commands=$(ro_client rails get_models)
+ commands=$(zr get_models)
local cur="${COMP_WORDS[$COMP_CWORD]}"
if [ -z "($commands)" ]; then
echo '' >> /dev/null
else
@@ -119,11 +301,11 @@
_dm () {
local cur options command commands
_get_comp_words_by_ref cur
- commands=$(ro_client rails get_migrations)
+ commands=$(zr get_migrations)
local cur="${COMP_WORDS[$COMP_CWORD]}"
if [ -z "($commands)" ]; then
echo '' >> /dev/null
else
@@ -136,11 +318,11 @@
_ds () {
local cur options command commands
_get_comp_words_by_ref cur
- commands=$(ro_client rails get_scaffolds)
+ commands=$(zr get_scaffolds)
local cur="${COMP_WORDS[$COMP_CWORD]}"
if [ -z "($commands)" ]; then
echo '' >> /dev/null
else
@@ -172,16 +354,14 @@
-
-
_da () {
local cur options command commands
_get_comp_words_by_ref cur
- commands=$(ro_client rails get_assets)
+ commands=$(zr get_assets)
local cur="${COMP_WORDS[$COMP_CWORD]}"
if [ -z "($commands)" ]; then
echo '' >> /dev/null
else
@@ -194,11 +374,11 @@
_dco () {
local cur options command commands
_get_comp_words_by_ref cur
- commands=$(ro_client rails get_controllers)
+ commands=$(zr get_controllers)
local cur="${COMP_WORDS[$COMP_CWORD]}"
if [ -z "($commands)" ]; then
echo '' >> /dev/null
else
@@ -211,11 +391,11 @@
_dmo () {
local cur options command commands
_get_comp_words_by_ref cur
- commands=$(ro_client rails get_models)
+ commands=$(zr get_models)
local cur="${COMP_WORDS[$COMP_CWORD]}"
if [ -z "($commands)" ]; then
echo '' >> /dev/null
else
@@ -228,11 +408,11 @@
_dm () {
local cur options command commands
_get_comp_words_by_ref cur
- commands=$(ro_client rails get_migrations)
+ commands=$(zr get_migrations)
local cur="${COMP_WORDS[$COMP_CWORD]}"
if [ -z "($commands)" ]; then
echo '' >> /dev/null
else
@@ -245,11 +425,11 @@
_ds () {
local cur options command commands
_get_comp_words_by_ref cur
- commands=$(ro_client rails get_scaffolds)
+ commands=$(zr get_scaffolds)
local cur="${COMP_WORDS[$COMP_CWORD]}"
if [ -z "($commands)" ]; then
echo '' >> /dev/null
else
@@ -258,29 +438,27 @@
}
complete -o default -F _ds ds
-
-
-
-
alias z='zeus'
- alias zr='z rails'
+ alias zr='zeus rails'
alias g='z g'
alias d='z d'
alias zs='z s'
+ alias zk='zeus rake'
+
alias a='z g assets'
- alias c='zr controller'
+ alias c='z g controller'
alias m='zr migration'
alias mo='zr model'
@@ -294,27 +472,25 @@
alias dm='d migration'
alias ds='d scaffold'
- alias mi='z rake db:migrate'
-
- alias bx='bundle exec'
-
alias z='zeus'
- alias zr='z rails'
+ alias zr='zeus rails'
alias g='z g'
alias d='z d'
alias zs='z s'
+ alias zk='zeus rake'
+
alias a='z g assets'
- alias c='zr controller'
+ alias c='z g controller'
alias m='zr migration'
alias mo='zr model'
@@ -328,14 +504,10 @@
alias dm='d migration'
alias ds='d scaffold'
- alias mi='z rake db:migrate'
-
- alias bx='bundle exec'
-
alias gfi='git init && git flow init -f'
alias fr='git flow release'
alias frf='fr finish'
@@ -373,14 +545,16 @@
+
+
_da () {
local cur options command commands
_get_comp_words_by_ref cur
- commands=$(ro_client rails get_assets)
+ commands=$(zr get_assets)
local cur="${COMP_WORDS[$COMP_CWORD]}"
if [ -z "($commands)" ]; then
echo '' >> /dev/null
else
@@ -393,11 +567,11 @@
_dco () {
local cur options command commands
_get_comp_words_by_ref cur
- commands=$(ro_client rails get_controllers)
+ commands=$(zr get_controllers)
local cur="${COMP_WORDS[$COMP_CWORD]}"
if [ -z "($commands)" ]; then
echo '' >> /dev/null
else
@@ -410,11 +584,11 @@
_dmo () {
local cur options command commands
_get_comp_words_by_ref cur
- commands=$(ro_client rails get_models)
+ commands=$(zr get_models)
local cur="${COMP_WORDS[$COMP_CWORD]}"
if [ -z "($commands)" ]; then
echo '' >> /dev/null
else
@@ -427,11 +601,11 @@
_dm () {
local cur options command commands
_get_comp_words_by_ref cur
- commands=$(ro_client rails get_migrations)
+ commands=$(zr get_migrations)
local cur="${COMP_WORDS[$COMP_CWORD]}"
if [ -z "($commands)" ]; then
echo '' >> /dev/null
else
@@ -444,11 +618,11 @@
_ds () {
local cur options command commands
_get_comp_words_by_ref cur
- commands=$(ro_client rails get_scaffolds)
+ commands=$(zr get_scaffolds)
local cur="${COMP_WORDS[$COMP_CWORD]}"
if [ -z "($commands)" ]; then
echo '' >> /dev/null
else
@@ -480,16 +654,14 @@
-
-
_da () {
local cur options command commands
_get_comp_words_by_ref cur
- commands=$(ro_client rails get_assets)
+ commands=$(zr get_assets)
local cur="${COMP_WORDS[$COMP_CWORD]}"
if [ -z "($commands)" ]; then
echo '' >> /dev/null
else
@@ -502,11 +674,11 @@
_dco () {
local cur options command commands
_get_comp_words_by_ref cur
- commands=$(ro_client rails get_controllers)
+ commands=$(zr get_controllers)
local cur="${COMP_WORDS[$COMP_CWORD]}"
if [ -z "($commands)" ]; then
echo '' >> /dev/null
else
@@ -519,11 +691,11 @@
_dmo () {
local cur options command commands
_get_comp_words_by_ref cur
- commands=$(ro_client rails get_models)
+ commands=$(zr get_models)
local cur="${COMP_WORDS[$COMP_CWORD]}"
if [ -z "($commands)" ]; then
echo '' >> /dev/null
else
@@ -536,11 +708,11 @@
_dm () {
local cur options command commands
_get_comp_words_by_ref cur
- commands=$(ro_client rails get_migrations)
+ commands=$(zr get_migrations)
local cur="${COMP_WORDS[$COMP_CWORD]}"
if [ -z "($commands)" ]; then
echo '' >> /dev/null
else
@@ -553,11 +725,11 @@
_ds () {
local cur options command commands
_get_comp_words_by_ref cur
- commands=$(ro_client rails get_scaffolds)
+ commands=$(zr get_scaffolds)
local cur="${COMP_WORDS[$COMP_CWORD]}"
if [ -z "($commands)" ]; then
echo '' >> /dev/null
else
@@ -571,14 +743,10 @@
-
-
-
-
_frf () {
local cur options command commands
_get_comp_words_by_ref cur
commands=$(zeus git_flow get_releases)
local cur="${COMP_WORDS[$COMP_CWORD]}"
@@ -727,113 +895,8 @@
complete -o default -F _ffc ffc
-alias list="ro info list ."
-
-alias guard="bundle exec guard"
-
-
-alias sp="smplayer"
-function record() {
- recordmydesktop --no-sound --output=$1
-}
-
-alias work="ro shortcuts work"
-
-alias ga='git add'
-alias gaa='ga .'
-alias gb='git branch'
-alias gco='git checkout'
-alias gc='git commit -am'
-alias gi='git add -i'
-alias gl='git log --oneline --all --color --graph --decorate'
-alias gm='git merge'
-alias gp='git push -u origin master'
-alias gst='git status'
-
-
-#idea
-alias i='idea `pwd`'
-
-#rubymine
-alias r='rubymine `pwd`'
-alias libspec="ro shortcuts lib_spec"
-
-cdir () {
-path=`ro_client navigate get_dir $1`
-echo "cd $path"
-cd "$path"
-}
-
-odir () {
-cdir $1
-rubymine .
-}
-
-# cd to project path
-cpj () {
-path=`ro_client navigate get_project $1`
-echo "cd $path"
-cd "$path"
-}
-
-pj () {
-cpj $1
-rubymine "$path"
-}
-
-cjpj () {
-path=`ro_client navigate get_project $1 java`
-echo "opening $path"
-cd "$path"
-}
-
-jpj () {
-path=`ro_client navigate get_project $1 java`
-echo "opening $path"
-cd "$path"
-idea "$path"
-}
-
-alias rco="ro shortcuts open_ro_commands"
-alias rsu="ro shortcuts open_ro_support"
-
-
-alias spec="ro generate spec_file"
-alias ex="ro generate ex"
-alias dl="cd ~/Downloads"
-alias sshproxy="sudo service ssh-proxy"
-alias roserver="sudo service ro_server"
-
-# cd to dir
-rp () {
-cd "$ruby_projects"
-}
-
-dp () {
-cd "~/Dropbox"
-}
-
-# js java project
-alias jp="cd $js_java_projects"
-
-alias fas="ro_client file_actions"
-alias rps="ro_client ro_procs"
-alias rclocal="sudo rubymine /etc/rc.local"
-alias wp='working_project'
-
-alias work_project="cd $work_project"
-alias l="cd $learn"
-
-#find railscasts
-alias rc="ro_client file_actions find_railscasts"
-
-# reload ~/bashrc.erb
-alias rb="source ~/.bashrc"
-
-alias proxy="http_proxy='socks5://127.0.0.1:1080'"
-
-alias jk="jekyll"
-alias jks="jekyll server"
-
+# rrjj
+alias a="zeus ro rails_navigate access"
+alias railswork="bundle exec ro rails_shortcuts work"