Commit Graph

14 Commits

Author SHA1 Message Date
624ea575cc Changed behavior of program when 'disable color' flag is passed.
Instead of printing out the contents early on (which wouldn't allow it to work
with '-n'), I skip the loop that applies colors based on the regular expressions.
2024-08-13 00:55:55 -05:00
ffae02b62b Fixed bug where line number wasn't updated 2024-08-13 00:51:53 -05:00
81b976bcc7 Added 'line number' flag, and added check for empty file.
I added a 'line number' flag ('-n') which will print the line number
with padding before every line. To ensure that a line number isn't printed when
trying to 'ccat' an empty file, I added a check to see if the file is empty.
If it is, the program exits.
2024-08-13 00:49:02 -05:00
0b67cb317e Added 'disable color' flag ('-d') to disable color printing. Also replaced os.Args with flag.Args, to retrieve command-line arguments after stripping out flags 2024-08-13 00:21:26 -05:00
098f7fe01b Instead of using command-line flags, I decided to generate the configs if they don't exist 2024-08-13 00:07:46 -05:00
76fc61a19d Wrote function to copy embedded config files to a config directory 2024-08-13 00:01:00 -05:00
94d1d99af2 Added a flag called 'generate-config' which will generate default config files. 2024-08-12 11:27:07 -05:00
7feac0b5f7 Renamed 'printAndExit' to 'printErrAndExit' 2024-08-10 11:29:18 -05:00
2a007ba56c Replaced 'panic' with an error return, and a call to 'printAndExit' 2024-08-10 11:28:41 -05:00
71051ce7f0 Wrote function to print an error and exit the program 2024-08-10 11:12:23 -05:00
461824d725 Added gitignore file 2024-08-10 11:04:22 -05:00
c4f8028e8a Removed binary file 2024-08-10 11:04:09 -05:00
3678dc5161 Added regex match for comparison operators 2024-08-09 19:26:35 -05:00
025ec775ca First commit 2024-08-09 19:20:42 -05:00