From b53b2bac1b5e1dbd648d2225355ea4d70857f0e5 Mon Sep 17 00:00:00 2001 From: Armaan Bhojwani <3fb650a9-b47e-4604-a282-1dd91953b2ee@anonaddy.me> Date: Thu, 15 Oct 2020 21:31:52 -0400 Subject: [PATCH] some big changes --- Makefile | 11 +++++++++++ TODO.md | 2 ++ charsel | 19 ++++++++++--------- 3 files changed, 23 insertions(+), 9 deletions(-) diff --git a/Makefile b/Makefile index cfed219..d9ffea1 100644 --- a/Makefile +++ b/Makefile @@ -13,3 +13,14 @@ uninstall: >rm -rf /usr/share/charsel/charfiles/ >rm -rf /usr/share/doc/charsel/ >rm -rf /usr/bin/charsel + +reinstall: +>rm -rf /usr/share/charsel/charfiles/ +>rm -rf /usr/share/doc/charsel/ +>rm -rf /usr/bin/charsel +>chmod +x ./charsel +>mkdir -p /usr/share/charsel/charfiles/ +>cp charfiles/* /usr/share/charsel/charfiles/ +>mkdir /usr/share/doc/charsel +>cp README.md /usr/share/doc/charsel/ +>cp ./charsel /usr/bin/ diff --git a/TODO.md b/TODO.md index f79d4f7..ec2a980 100644 --- a/TODO.md +++ b/TODO.md @@ -1,2 +1,4 @@ - Create a simple gtk interface using Zenity - "Smart" shortcode length detection +- Add comment support to charfiles +- Add purge option to makefile diff --git a/charsel b/charsel index 0934f5e..077b10f 100755 --- a/charsel +++ b/charsel @@ -9,11 +9,13 @@ then elif [[ ! "$(ls -A $CHARDIR)" ]] then cp -rf /usr/share/charsel/- $CHARDIR/ - cp -rf ~/.local/share/charsel/- $CHARDIR/ + cp -rf $HOME/.local/share/charsel/- $CHARDIR/ fi # Check for user inputs -if [[ $1 == "list" ]] +if [[ $1 == "list" \ + || $1 == "-l" \ + || $1 == "--list" ]] then echo "The following charfiles are installed" ls $CHARDIR/charfiles @@ -54,14 +56,13 @@ do | tail -n +2 \ | column -t -N input,output --output-separator ' | ' --separator ',' - # Display previous - echo "--------------------------" - echo "previous shorcode:" $INPUT - echo "previous output: " $OUTPUT - echo "--------------------------" - + echo "*-------------------------*" + echo "| previous shorcode:" $INPUT + echo "| previous output: " $OUTPUT + echo "*-------------------------*" + # User input - read -p "input shortcode: " -N $LENGTH INPUT + read -p "| input shortcode: " -N $LENGTH INPUT # This can definately be simplifed, but it works fine LINENUMBER=$(cut -f 1 -d ',' -s $CHARFILE \ -- 2.39.2