Examples of History


Examples of jline.History

           
            String historyFile = System.getProperty("user.home") + File.separator + HISTORYFILE;

            try
            {
                History history = new History(new File(historyFile));
                reader.setHistory(history);
            }
            catch (IOException exp)
            {
                sessionState.err.printf("Unable to open %s for writing %n", historyFile);
View Full Code Here

Examples of jline.History

    final String HISTORYFILE = ".hivehistory";
    String historyDirectory = System.getProperty("user.home");
    try {
      if ((new File(historyDirectory)).exists()) {
        String historyFile = historyDirectory + File.separator + HISTORYFILE;
        reader.setHistory(new History(new File(historyFile)));
      } else {
        System.err.println("WARNING: Directory for Hive history file: " + historyDirectory +
                           " does not exist.   History will not be available during this session.");
      }
    } catch (Exception e) {
View Full Code Here

Examples of jline.History

            mode = ExecMode.SHELL;
            ConsoleReader reader = new ConsoleReader(System.in, new OutputStreamWriter(System.out));
            reader.setDefaultPrompt("grunt> ");
            final String HISTORYFILE = ".pig_history";
            String historyFile = System.getProperty("user.home") + File.separator  + HISTORYFILE;
            reader.setHistory(new History(new File(historyFile)));
            ConsoleReaderInputStream inputStream = new ConsoleReaderInputStream(reader);
            grunt = new Grunt(new BufferedReader(new InputStreamReader(inputStream)), pigContext);
            grunt.setConsoleReader(reader);
            gruntCalled = true;
            grunt.run();
View Full Code Here

Examples of jline.History

     *         if an Exception occurs
     */
    public void runInteractive() throws Exception {
        // built jline console reader with history + tab completion
        ConsoleReader reader = new ConsoleReader();
        reader.setHistory(new History());
        reader.setUseHistory(true);
       
        // get all available commands for command tab completion
        Collection<CommandLine> commands =
            CommandLineFactory.getInstance().getCommandLines();
View Full Code Here

Examples of jline.History

            mode = ExecMode.SHELL;
            ConsoleReader reader = new ConsoleReader(System.in, new OutputStreamWriter(System.out));
            reader.setDefaultPrompt("grunt> ");
            final String HISTORYFILE = ".pig_history";
            String historyFile = System.getProperty("user.home") + File.separator  + HISTORYFILE;
            reader.setHistory(new History(new File(historyFile)));
            ConsoleReaderInputStream inputStream = new ConsoleReaderInputStream(reader);
            grunt = new Grunt(new BufferedReader(new InputStreamReader(inputStream)), pigContext);
            grunt.setConsoleReader(reader);
            gruntCalled = true;
            grunt.run();
View Full Code Here

Examples of jline.History

    private ConsoleReader prepareReader() throws IOException {
        ConsoleReader reader = new ConsoleReader();
        reader.setUseHistory(true);
        Map<String, String> env = System.getenv();
        String fileHistory = String.format("%s/.%s.history", env.containsKey("HOME") ? env.get("HOME"): "/tmp", commandPrompt);
        reader.setHistory(new History(new File(fileHistory)));
        return reader;
    }
View Full Code Here

Examples of jline.History

    String historyPath = configDir + "/shell_history.txt";
    File accumuloDir = new File(configDir);
    if (!accumuloDir.exists() && !accumuloDir.mkdirs())
      log.warn("Unable to make directory for history at " + accumuloDir);
    try {
      History history = new History();
      history.setHistoryFile(new File(historyPath));
      reader.setHistory(history);
    } catch (IOException e) {
      log.warn("Unable to load history file at " + historyPath);
    }
   
View Full Code Here

Examples of jline.console.history.History

    @Option(name = "-c", aliases = { "--clear" }, description = "Clears the shell command history.", required = false, multiValued = false)
    private boolean clear;
   
    @Override
    protected Object doExecute() throws Exception {
        History history = (History) session.get(".jline.history");      

        if (history != null && clear) {
            history.clear();
        }
       
        for (History.Entry element : history) {
            System.out.println(
                    Ansi.ansi()
View Full Code Here

Examples of lipstone.joshua.parser.util.History

      log.open(baseLocation.toString() + PluginController.PATH_SEPARATOR + "log.txt");
      log.clearLog();
    }
    catch (IOException e) {}
    command = "";
    history = new History(baseLocation);
    File pluginsFolder = baseLocation.getFileSystem().getPath(baseLocation.toString(), "plugins/").toFile();
    if (!pluginsFolder.exists())
      pluginsFolder.mkdirs();
    File dataFolder = baseLocation.getFileSystem().getPath(baseLocation.toString(), "data/").toFile();
    if (!dataFolder.exists())
View Full Code Here

Examples of net.fp.rp.search.back.extractor.util.History

            //add the status to the model
            model.put(ModelView.STATUS, message);

            //get the history list (IE and Mozzila)
            History history = new History();
            LinkedList list = history.getHistoryList();

            for (int i = 0; i < list.size(); i++) {
                final String location = (String) list.get(i);

                //add the information to the system
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.