summaryrefslogtreecommitdiff
path: root/src/jed.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/jed.java')
-rw-r--r--src/jed.java29
1 files changed, 29 insertions, 0 deletions
diff --git a/src/jed.java b/src/jed.java
new file mode 100644
index 0000000..7c14070
--- /dev/null
+++ b/src/jed.java
@@ -0,0 +1,29 @@
+package jed;
+
+import java.util.Scanner;
+
+public class jed {
+
+ public static Scanner kbIn = new Scanner(System.in);
+ public static filebuffer file;
+
+ public static void main(String args[]) {
+ String fileName = null;
+ boolean hasName = true;
+ try { // checks if the user provided a file name
+ fileName = args[0];
+ } catch (IndexOutOfBoundsException e) {
+ hasName = false;
+ }
+
+ file = new filebuffer(fileName, hasName);
+
+ while (true) {
+ String line = kbIn.nextLine();
+ int err = cmd.parser(line);
+ if (err == 1)
+ break;
+ }
+ kbIn.close();
+ }
+} \ No newline at end of file