]> git.armaanb.net Git - charsel.git/commitdiff
added comment support to charfile, beutification
authorArmaan Bhojwani <3fb650a9-b47e-4604-a282-1dd91953b2ee@anonaddy.me>
Fri, 16 Oct 2020 23:18:22 +0000 (19:18 -0400)
committerArmaan Bhojwani <3fb650a9-b47e-4604-a282-1dd91953b2ee@anonaddy.me>
Fri, 16 Oct 2020 23:18:22 +0000 (19:18 -0400)
README.md
TODO.md
charsel

index 451ecc1ea208c3577b3fe24958d2e9acbd0c7578..0040ba7496f3fb028eef629452565958164a18bc 100644 (file)
--- a/README.md
+++ b/README.md
@@ -24,7 +24,7 @@ The default charfiles all have hidden shortcuts for capital letters that are not
 ## Creating a charfile
 Make a new file in `~/.local/share/charsel/` or `/usr/share/charsel` with the name that you would like to use to call the charfile in the command.
 
-Fill it in, using the provided examples as a template. Hidden shortcuts go above the '---'
+Fill it in, using the provided examples as a template. Hidden shortcuts go above the '---', lines can be commented out using a '#' at the start of the line
 
 ## License
 Charfile is GNU GPLv3 licensed, see COPYING for more information
diff --git a/TODO.md b/TODO.md
index ec2a980c7a7906b096c023701a65d837327c6854..f07b9124e7d5fda0ab500eab2bb518da7a35b2eb 100644 (file)
--- a/TODO.md
+++ b/TODO.md
@@ -1,4 +1,2 @@
-- 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 077b10f87f8e11bf2c0e29cbdc1b528b31fe9528..a8b5e66c5771848ae71e6dcd4fda322a19afd076 100755 (executable)
--- a/charsel
+++ b/charsel
@@ -50,12 +50,19 @@ clear
 # Main program
 while :
 do
-  # Format charfile into table, showing only the shortcuts below the divider in the charfile
+  # Format output
+  echo "*---------*---------------*"
+  echo "| CHARSEL | " $1
+  echo "*---------*---------------*"
+  echo ""
+
   cat $CHARFILE \
+    | sed -e '/^[ \t]*#/d' \
     | grep -A 100 - \
     | tail -n +2 \
     | column -t -N input,output --output-separator ' | ' --separator ','
 
+  echo ""
   echo "*-------------------------*"
   echo "| previous shorcode:" $INPUT
   echo "| previous output:  " $OUTPUT