Giter VIP home page Giter VIP logo

jarvis2's Introduction

Acknowledgements

  • @jsks and Mr Green from ArchLinux for helping improve this code a lot!

Meta Information

Author: Alex Guo.

Contact: [email protected].

Program: JARVIS.

Backend code: https://github.com/mallochine/jarvis2-svr

JARVIS 2.0

EDIT: I recently added a whole bunch of new functionality, but I realized that people really liked the original version of JARVIS 2, which kept things extremely simple -- just add a bookmark, and <boom>, you're done. So I reverted JARVIS 2 to its original version, and put all the new functionality in JARVIS 3.

What's new in JARVIS 2.0 is filesystem navigation through user-input, instead of a machine trying to learn how the user behaves. As it turns out, it's a very natural habit for users to create bookmarks, while it is very unnatural to wait for a machine to catch up to you. JARVIS 2.0 is a prototype for this "naturalness" thesis.

Installation

Download the whole git repo (git clone https://github.com/mallochine/jarvis2.git). Run the command that corresponds to your shell:

  • make bash
  • make zsh
aguo@unix1:~/space$ git clone https://github.com/mallochine/jarvis2.git
Initialized empty Git repository in /afs/andrew.cmu.edu/usr9/aguo/space/jarvis2/.git/
remote: Counting objects: 252, done.
remote: Compressing objects: 100% (136/136), done.
remote: Total 252 (delta 117), reused 247 (delta 112)
Receiving objects: 100% (252/252), 29.74 KiB, done.
Resolving deltas: 100% (117/117), done.
aguo@unix1:~/space$
aguo@unix1:~/space$
aguo@unix1:~/space$
aguo@unix1:~/space$ cd jarvis2
aguo@unix1:~/space/jarvis2$ make bash
cp .jrc ~/.jrc;
echo . ~/.jrc >> ~/.bashrc;
echo "Restart your shell"
Restart your shell

Commands

j add, j +

Add the current directory as a bookmark.

aguo@unix4:~/Documents/10605$ j add
Type an alias for the current working directory, or ^C to quit:
ml
"ml" added as a bookmark.
[ec2-user@ip-10-252-62-49 bics]$ j + bics
"bics" added as a bookmark.

j add <file>, j + <file>

Adds the <file> as a bookmark.

TODO

j <bookmark>

(Credits to jsks for significantly simplying the code here.).

There are two cases:

  • If the bookmark is for a directory, then cd there.
  • If the bookmark is for a file, then open the file for edit.

Case 1:

aguo@unix1:~$ j ml
/afs/andrew.cmu.edu/usr9/aguo/Documents/10605
aguo@unix1:~/Documents/10605$

Case 2:

aguo@unix2:~$ j readme
  1 Acknowledgements
  2 ----------------
  3 - @jsks for removing all subshells and simplifying code.
  4 - Mr Green from ArchLinux for helping make the code more cross-shell.
  5 
  6 ...

j del, j -, j del <bookmark>, j - <bookmark>

(Thanks to Mr Green for conceiving the idea and writing code for this!).

Delete a bookmark.

aguo@unix4:~$ j -
Type an alias you wish to delete, or ^C to quit:
hadoop
"hadoop" deleted.
aguo@unix2:~$ j - hadoop
"hadoop" deleted.

j edit, j vim

Edits your bookmarks using your shell's default editor (kudos to Mr Green for writing this!).

[ec2-user@ip-10-252-62-49 ~]$ j edit
  1 bics=/var/bics
  2 newpl=/var/bics/newplayers
  3 src=/home/ec2-user/space/bics-current/src
  4 stats=/var/bics/data/stats
  5 players=/var/bics/players
  6 jarvis2=/home/ec2-user/space/jarvis2
  7 html=/var/www/html
  8 debug=/var/bics-debug
  9 proxies=/home/ec2-user/space/fics-proxy
~
~
~
~
~
~
~
~
~

j all

Lists all the bookmarks you have.

[ec2-user@ip-10-252-62-49 ~]$ j all
bics=/var/bics
newpl=/var/bics/newplayers
src=/home/ec2-user/space/bics-current/src
stats=/var/bics/data/stats
players=/var/bics/players
jarvis2=/home/ec2-user/space/jarvis2
html=/var/www/html
debug=/var/bics-debug
proxies=/home/ec2-user/space/fics-proxy

j help

Displays help info.

Usage: j [CMD] <file or dir> <bookmark>

Commands
  add | +   Add a bookmark
  del | -   Delete a bookmark
  all       List all bookmarks
  help      Print this help message

If no command is given, j jumps to the given bookmarks.

We would like help with...

See Also

jarvis2's People

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.