dot

packages and services management
Log | Files | Refs | README

commit c889a911043952168c38ff609fb68bb8c9949e81
parent 222f14399d4f834f612ed141047e6c06d0747890
Author: Josuah Demangeon <mail@josuah.net>
Date:   Wed, 12 Apr 2017 20:00:52 +0200

added fun-reverse

Diffstat:
M.profile | 2+-
Abin/fun-reverse | 51+++++++++++++++++++++++++++++++++++++++++++++++++++
Mbin/io-edit | 2+-
3 files changed, 53 insertions(+), 2 deletions(-)

diff --git a/.profile b/.profile @@ -18,7 +18,7 @@ export MAIL="$HOME/mail/INBOX" export NAME='Josuah Demangeon' EMAIL='mail@josuah.net' TZ='Europe/Paris' # default commands -export EDITOR='mg' VISUAL='mg' +export EDITOR='vis' VISUAL='vis' export PAGER='less' MANPAGER='less -R' DVTM_PAGER='less -R' export BROWSER='firefox' diff --git a/bin/fun-reverse b/bin/fun-reverse @@ -0,0 +1,51 @@ +# print a text line by line, with a delaye between every charactery + +while IFS='' read -r line +do + line="$(printf %s "$line" | rev)" + while [ "$line" ] + do + char="$(printf %s "$line" | cut -c 1)" + + case "$char" in + + # lowercase + (a) l='ɐ' ;; (b) l='q' ;; (c) l='ɔ' ;; (d) l='p' ;; + (e) l='ǝ' ;; (f) l='ɟ' ;; (g) l='ƃ' ;; (h) l='ɥ' ;; + (i) l='ᴉ' ;; (j) l='ɾ' ;; (k) l='ʞ' ;; (l) l='j' ;; + (m) l='ɯ' ;; (n) l='u' ;; (o) l='o' ;; (p) l='d' ;; + (q) l='b' ;; (r) l='ɹ' ;; (s) l='s' ;; (t) l='ʇ' ;; + (u) l='n' ;; (v) l='ʌ' ;; (w) l='ʍ' ;; (x) l='x' ;; + (y) l='ʎ' ;; (z) l='z' ;; + + # uppercase + (A) l='∀' ;; (B) l='B' ;; (C) l='Ɔ' ;; (D) l='D' ;; + (E) l='Ǝ' ;; (F) l='Ⅎ' ;; (G) l='פ' ;; (H) l='H' ;; + (I) l='I' ;; (J) l='ſ' ;; (K) l='K' ;; (L) l='˥' ;; + (M) l='W' ;; (N) l='N' ;; (O) l='O' ;; (P) l='Ԁ' ;; + (Q) l='Q' ;; (R) l='R' ;; (S) l='S' ;; (T) l='┴' ;; + (U) l='∩' ;; (V) l='Λ' ;; (W) l='M' ;; (X) l='X' ;; + (Y) l='⅄' ;; (Z) l='Z' ;; + + # digits + (0) l='0' ;; (1) l='Ɩ' ;; (2) l='ᄅ' ;; (3) l='Ɛ' ;; + (4) l='ㄣ' ;; (5) l='ϛ' ;; (6) l='9' ;; (7) l='ㄥ' ;; + (8) l='8' ;; (9) l='6' ;; + + # special characters + (,) l="'" ;; (.) l='˙' ;; (\?) l='¿' ;; (!) l='¡' ;; + (") l='"' ;; (\') l=',' ;; (\`) l=',' ;; + (\() l=')' ;; (\)) l='(' ;; (\[) l=']' ;; (\]) l='[' ;; + ({) l='}' ;; (}) l='{' ;; (\<) l='>' ;; (\>) l='<' ;; + (\&) l='⅋' ;; (_) l='‾' ;; + + (*) l="$char" ;; + + esac + + printf '%s' "$l" + + line="${line#?}" + done + printf '\n' +done diff --git a/bin/io-edit b/bin/io-edit @@ -1,4 +1,4 @@ -# Prompt a file to open in PAGER, with an history. In less(1), 'v' to edit. +# prompt for a file to open with EDITOR, with an history of last 10 opened CACHE="${XDG_CACHE_HOME:-$HOME/.cache}"