about summary refs log tree commit diff
path: root/+commands.el
diff options
context:
space:
mode:
authorGriffin Smith <root@gws.fyi>2020-03-26T19·03-0400
committerGriffin Smith <root@gws.fyi>2020-03-26T19·03-0400
commit35c76e7098111ed0d84aef1bd09f7025ce728b87 (patch)
treecea6f3893ffb3b983fdc42b4c38aa5c3c1a5fe36 /+commands.el
parent23b179ad1d3d2e07c114741dffc50a8343f0a7a6 (diff)
Many updates, too many to count
commit messages are for code, not config

I guess
Diffstat (limited to '+commands.el')
-rw-r--r--+commands.el28
1 files changed, 24 insertions, 4 deletions
diff --git a/+commands.el b/+commands.el
index 4025a9504a..a5753c8e99 100644
--- a/+commands.el
+++ b/+commands.el
@@ -1,4 +1,4 @@
-;;; private/grfn/+commands.el -*- lexical-binding: t; -*-
+
 
 (defalias 'ex! 'evil-ex-define-cmd)
 
@@ -29,6 +29,8 @@
 (ex! "na[rrow]"     #'+evil:narrow-buffer)
 (ex! "retab"        #'+evil:retab)
 
+(ex! "glog" #'magit-log-buffer-file)
+
 ;; External resources
 ;; TODO (ex! "db"          #'doom:db)
 ;; TODO (ex! "dbu[se]"     #'doom:db-select)
@@ -115,13 +117,31 @@
 ;; Org-mode
 (ex! "cap"         #'+org-capture/dwim)
 
-(ex! "arev" #'generate-alembic-migration)
+(evil-define-command evil-alembic-revision (args)
+  (interactive "<a>")
+  (apply
+   #'generate-alembic-migration
+   (read-string "Message: ")
+   (s-split "\\s+" (or args ""))))
+(ex! "arev[ision]" #'evil-alembic-revision)
 
 (evil-define-command evil-alembic-upgrade (&optional revision)
   (interactive "<a>")
-  (alembic-upgrade revision))
+  (alembic-upgrade (or revision "head")))
+
+(ex! "aup[grade]" #'evil-alembic-upgrade)
+
+(evil-define-command evil-alembic-downgrade (&optional revision)
+  (interactive "<a>")
+  (alembic-downgrade revision))
+
+(ex! "adown[grade]" #'evil-alembic-downgrade)
+
+(evil-define-command evil-alembic (args)
+  (interactive "<a>")
+  (run-alembic args))
 
-(ex! "aup" #'evil-alembic-upgrade)
+(ex! "alemb[ic]" #'evil-alembic)
 
 ;; Elixir
 (add-hook! elixir-mode