From dea474796537750664010d2d633179729f4aea8e Mon Sep 17 00:00:00 2001 From: Ev Bogdanov Date: Wed, 16 Aug 2017 20:54:21 +0300 Subject: [PATCH] A big renaming --- README.md | 17 ++++++----------- bin/{c+ => c} | 0 bin/commit | 18 ++++++++++++++++++ bin/git+ | 10 ---------- bin/{h+ => hd} | 0 bin/hg+ | 10 ---------- bin/{t+ => i} | 0 bin/{c- => uc} | 0 bin/{t- => ui} | 0 9 files changed, 24 insertions(+), 31 deletions(-) rename bin/{c+ => c} (100%) create mode 100755 bin/commit delete mode 100755 bin/git+ rename bin/{h+ => hd} (100%) delete mode 100755 bin/hg+ rename bin/{t+ => i} (100%) rename bin/{c- => uc} (100%) rename bin/{t- => ui} (100%) diff --git a/README.md b/README.md index f602562..8ae6998 100644 --- a/README.md +++ b/README.md @@ -82,19 +82,14 @@ I spawn Acme by running `a` script. Who is who in **bin** directory: - `a` start Acme -- `c+ SYMBOL` comment selection (python: `|c+` or `|c+ '#'`, erlang: `|c+ %`, js: `|c+ //`) -- `c- SYMBOL` uncomment selection -- `git+ MESSAGE` git: commit and push to master -- `h+ SYMBOL` draw a pretty heading -- `hg+ MESSAGE` hg: commit and push to master -- `lower` convert selection to lowercase +- `c SYMBOL`/`uc SYMBOL` comment/uncomment selection +- `commit MESSAGE` commit and push to master +- `hd SYMBOL` draw a pretty heading +- `i`/`ui` indent/unindent selection - `lstrip` remove leading whitespace - `search` search with The Silver Searcher -- `s2t N_SPACES` spaces to tabs (default: 4 spaces to 1 tab) -- `t2s N_SPACES` tabs to spaces (default: 1 tab to 4 spaces) -- `t+` add tab -- `t-` delete tab -- `upper` convert selection to uppercase +- `t2s N_SPACES`/`s2t N_SPACES` tabs <=> spaces +- `upper`/`lower` convert selection to uppercase/lowercase Put these guys in your **$PATH**. diff --git a/bin/c+ b/bin/c similarity index 100% rename from bin/c+ rename to bin/c diff --git a/bin/commit b/bin/commit new file mode 100755 index 0000000..3ed9670 --- /dev/null +++ b/bin/commit @@ -0,0 +1,18 @@ +#!/usr/bin/env bash + +if [ $# -eq 0 ]; then + echo 'What do you want to commit?' + exit 1 +fi + +if [ -d '.git' ]; then + git add -A + git commit -m ''"$*"'' + git push -u origin master +elif [ -d '.hg' ]; then + hg addremove + hg commit -m ''"$*"'' + hg push +else + echo 'No .git nor .hg directory found' +fi diff --git a/bin/git+ b/bin/git+ deleted file mode 100755 index fc2c9fd..0000000 --- a/bin/git+ +++ /dev/null @@ -1,10 +0,0 @@ -#!/usr/bin/env bash - -if [ $# -eq 0 ]; then - echo 'Where is my commit message, bro?' - exit 1 -fi - -git add -A -git commit -m ''"$*"'' -git push -u origin master diff --git a/bin/h+ b/bin/hd similarity index 100% rename from bin/h+ rename to bin/hd diff --git a/bin/hg+ b/bin/hg+ deleted file mode 100755 index 74c072c..0000000 --- a/bin/hg+ +++ /dev/null @@ -1,10 +0,0 @@ -#!/usr/bin/env bash - -if [ $# -eq 0 ]; then - echo 'Where is my commit message, huh?' - exit 1 -fi - -hg addremove -hg commit -m ''"$*"'' -hg push diff --git a/bin/t+ b/bin/i similarity index 100% rename from bin/t+ rename to bin/i diff --git a/bin/c- b/bin/uc similarity index 100% rename from bin/c- rename to bin/uc diff --git a/bin/t- b/bin/ui similarity index 100% rename from bin/t- rename to bin/ui