#!/usr/bin/env python3
import sys

LS_FLAG = '-l'

if __name__ == '__main__':
	args = sys.argv[1:]
	if '--help' in args:
		sys.exit(1)
	if LS_FLAG in args:
		from irank import editor as editor
		args.remove(LS_FLAG)
		editor.LIST_MODE = True
	else:
		from irank import curses_editor as editor

	editor.main(*args)
