diff --git a/README.md b/README.md index 0f8a522..c8ff6ca 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # chalk - a line based text editor -Chalk is a line based text editor for the terminal. It was originally an integrated part of _colorsh_, a custom shell used for ssh accounts at [Colorfield Space](gopher://colorfield.space:70/). This repo adds features and develops it into a more full and usable application. +Chalk is a line based text editor for the terminal. It was originally an integrated part of _colorsh_, a custom shell used for ssh accounts at [Colorfield Space](gopher://colorfield.space:70/). It has since been separated out as a standalone program usable anywhere with python3 and python3's readline (a batteries included feature of python3 for most operating systems). I tend to think about chalk as a simpler ed, similar to how some people use nano as simpler terminal editor than vi. It is far less powerful than ed, but functions in a similar line by line style with easy commands that walk you through the actions you are wanting to perform. @@ -8,7 +8,10 @@ I tend to think about chalk as a simpler ed, similar to how some people use nano ## Requirements Requires Python 3.6+. No other Python dependencies, standard library only. -Copy the file `chalk` to anywhere on your system path and make sure it is executable. Then just run `chalk [path to file]`. + +Copy the file `chalk` to anywhere on your system path and make sure it is executable. + +From there you can run `chalk` or `chalk _filepath_`. ## Commands diff --git a/chalk b/chalk index a8bad4b..47e7f48 100755 --- a/chalk +++ b/chalk @@ -567,6 +567,10 @@ if __name__ == '__main__': print('chalk [\033[3mfile path\033[0m]') sys.exit(1) elif len(args) == 2: + if len(args[1]) and args[1][0] == "-": + print('Unknown flag {}'.format(args[1])) + print('chalk [\033[3mfile path\033[0m]') + sys.exit(1) filepath = args[1] # Set readline settings