dot

packages and services management
Log | Files | Refs | README

commit 9625badba015b53ce8997c1876a20a983d8ccd25
parent 12750ecdeb0a5fed46c927c3bec0d92d8b06a128
Author: Josuah Demangeon <josuah.demangeon@gandi.net>
Date:   Wed, 19 Jul 2017 09:50:25 +0200

alias -> etc/bin

Diffstat:
Dbin/e | 3---
Abin/git-count | 5+++++
Dbin/grep-r | 4----
Abin/http-ix | 1+
Abin/http-myip | 1+
Abin/http-w1r3 | 1+
Abin/http-wttr | 1+
Dbin/lc | 4----
Abin/lines | 1+
Mshell/rc | 16+---------------
10 files changed, 11 insertions(+), 26 deletions(-)

diff --git a/bin/e b/bin/e @@ -1,3 +0,0 @@ -# echo - print all arguments to stdout, followed by a newline - -printf '%s\n' "$*" diff --git a/bin/git-count b/bin/git-count @@ -0,0 +1,5 @@ +echo "$(( + $(git diff | grep ^+ | wc -l) - + $(git diff | grep ^- | wc -l) +))" + diff --git a/bin/grep-r b/bin/grep-r @@ -1,4 +0,0 @@ -regex=$1 -shift - -find "$@" -type f -exec grep "$regex" {} + diff --git a/bin/http-ix b/bin/http-ix @@ -0,0 +1 @@ +curl -F f:1=@- ix.io diff --git a/bin/http-myip b/bin/http-myip @@ -0,0 +1 @@ +wget -qO- icanhazip.com diff --git a/bin/http-w1r3 b/bin/http-w1r3 @@ -0,0 +1 @@ +curl -F upload=@- w1r3.net diff --git a/bin/http-wttr b/bin/http-wttr @@ -0,0 +1 @@ +wget -qO- wttr.in diff --git a/bin/lc b/bin/lc @@ -1,4 +0,0 @@ -{ - ls -p "$@" | grep -e '/$' 2> /dev/null - ls -p "$@" | grep -v -e '/$' -e '^total' -} | column diff --git a/bin/lines b/bin/lines @@ -0,0 +1 @@ +find "${1:-.}" -name "*.[ch]" | xargs wc -l | sort -n diff --git a/shell/rc b/shell/rc @@ -1,6 +1,6 @@ PS1='$([ $? = 0 ] || printf " \033[31;1mx\033[m\n ") $(hostname) $(pwd) $(type git-status > /dev/null 2>&1 && git-status) -$([ "$USER" = root ] && printf "#" || printf "$") ' +$([ "$(whoami)" = root ] && printf "#" || printf "$") ' PS2='... ' PS3='... ' @@ -10,7 +10,6 @@ export TERM=xterm-256color # core alias cl='printf "\033[H\033[2J"' -alias la='l -A' # iomenu @@ -20,16 +19,3 @@ alias f='find . ! -path "*/.git/*" -type f | iomenu -p file' alias d='find . ! -path "*/.git/*" -type d | iomenu -p directory' alias c='cd "$(find "$HOME" -type d | sort | iomenu -p cd)"' alias p='p=$(io-ps)' - - -# utilities - -alias myip='wget -O - -q icanhazip.com' -alias ix='curl -F "f:1=<-" ix.io' -alias w1r3='curl -F upload=@- https://w1r3.net' -alias wttr='wget -qO- wttr.in' -alias lines='find . -name "*.[ch]" | xargs wc -l | sort -n' -alias count='echo "$(( - $(git diff | grep "^+" | wc -l) - - $(git diff | grep "^-" | wc -l) -))"'