- @jsks and Mr Green from ArchLinux for helping improve this code a lot!
- @jacqt for helping format the output of "jarvis all"
Author: Alex Guo.
Contact: [email protected].
Program: JARVIS.
Description: Significantly ease the creating and deleting of aliases.
Simply "jarvis add" to create a bookmark for the current working directory, or "jarvis add <alias>" to create an alias for a command.
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
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.
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.
(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.
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
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
~
~
~
~
~
~
~
~
~
~
~
~
Lists all the bookmarks you have.
$ jarvis all
alias j="jarvis" # Generated by JARVIS
alias bics="telnet alexbug.com 4000" # Generated by JARVIS
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
- Updating our wiki: https://github.com/mallochine/jarvis4/wiki/jrc---Documentation
- Getting JARVIS4 into the packagement systems of various Linux distributions, such as apt-get (ubuntu), pacman (archlinux), and more!
- Any helpful suggestions!