]> git.armaanb.net Git - charsel.git/commitdiff
some big changes
authorArmaan Bhojwani <3fb650a9-b47e-4604-a282-1dd91953b2ee@anonaddy.me>
Fri, 16 Oct 2020 01:31:52 +0000 (21:31 -0400)
committerArmaan Bhojwani <3fb650a9-b47e-4604-a282-1dd91953b2ee@anonaddy.me>
Fri, 16 Oct 2020 01:31:52 +0000 (21:31 -0400)
Makefile
TODO.md
charsel

index cfed2197ff1ec734a346afe36d24735d7f5d394d..d9ffea19fb81c1170b8653ce12176276b40985b9 100644 (file)
--- 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 f79d4f70f780dccb46c753bd9c3dd7333e6c199b..ec2a980c7a7906b096c023701a65d837327c6854 100644 (file)
--- 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 0934f5e7b18032a2dfdcd2a315acd5a66db7c1c8..077b10f87f8e11bf2c0e29cbdc1b528b31fe9528 100755 (executable)
--- 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 \