Coder Social home page Coder Social logo

jarvis4's Introduction

Acknowledgements

  • @jsks and Mr Green from ArchLinux for helping improve this code a lot!
  • @jacqt for helping format the output of "jarvis all"

Meta Information

Author: Alex Guo.

Contact: [email protected].

Program: JARVIS.

Description: Significantly ease the creating and deleting of aliases.

JARVIS 4.0

Simply "jarvis add" to create a bookmark for the current working directory, or "jarvis add <alias>" to create an alias for a command.

Installation

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

  • make bash
  • make zsh
$ git clone https://github.com/mallochine/jarvis4
Cloning into 'jarvis4'...
remote: Counting objects: 5, done.
remote: Compressing objects: 100% (4/4), done.
remote: Total 5 (delta 0), reused 5 (delta 0)
Unpacking objects: 100% (5/5), done.
$ cd jarvis4
$ make bash
mkdir ~/.jarvis_config
cp jarvis ~/.jarvis_config/jarvis
echo . ~/.jarvis_config/jarvis >> ~/.bashrc;
Restart your shell

Commands

jarvis add, jarvis +

Adds the current working directory as a bookmark.

aguo@unix5:~/Documents/10605$ jarvis add
Type an alias for "cd /afs/andrew.cmu.edu/usr9/aguo/Documents/10605 && pwd && ls", or ^C to quit:
ml
"ml" added as an alias.

jarvis add

Creates an alias for a command.

aguo@unix5:~$ jarvis add bics
Type a command for "bics", or ^C to quit:
telnet alexbug.com 5000
"bics" added as an alias.

jarvis del, jarvis -, jarvis del <bookmark>, jarvis - <bookmark>

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

Delete a bookmark.

$ jarvis -
Type an alias you wish to delete, or ^C to quit:
fics
"fics" deleted.
$ jarvis - fics
"fics" deleted.

jarvis find

Greps the bookmarks for a given query. If a query is given, then jarvis greps "<query>". Otherwise, jarvis will grep using $PWD.

$ jarvis find bics
alias bics="telnet alexbug.com 4000" # Generated by JARVIS

jarvis edit, jarvis vim

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

$ jarvis edit
  1 alias j="jarvis" # Generated by JARVIS
  2 alias bics="telnet alexbug.com 4000" # Generated by JARVIS
~
~
~
~
~
~
~
~
~
~
~
~

jarvis all

Lists all the bookmarks you have.

$ jarvis all
alias j="jarvis" # Generated by JARVIS
alias bics="telnet alexbug.com 4000" # Generated by JARVIS

jarvis help

Displays help info.

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

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

We would like help with...

jarvis4's People

Watchers

James Cloos avatar Anthony 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.