Commits

Amar Šahinović  committed a0b938e

Updated README

  • Participants
  • Parent commits a059aec

Comments (0)

Files changed (2)

     subparsers = parser.add_subparsers(help='commands', dest='command')
 
     add_parser = subparsers.add_parser('add', help='Add (or update) bookmark')
-    add_parser.add_argument('-u', help='Update bookmark', action='store_true',
-                            dest='update')
-    add_parser.add_argument('name', nargs='?',
-                            default=os.path.split(os.getcwd())[-1],
+    add_parser.add_argument('-u', help='Update bookmark', action='store_true', dest='update')
+    add_parser.add_argument('name', nargs='?', default=os.path.split(os.getcwd())[-1],
                             help='bookmark name (current directory name if empty)')
-
     add_parser.add_argument('path', nargs='*', default=[os.getcwd()],
                             help='bookmark path (current path if empty)')
 
     del_parser.add_argument('name', help='bookamark name')
 
     list_parser = subparsers.add_parser('list', help='List bookmark(s)')
-    list_parser.add_argument('name', help='bookmark name (list all if empty)',
-                             nargs='?')
+    list_parser.add_argument('name', help='bookmark name (list all if empty)', nargs='?')
 
-    nuke_parser = subparsers.add_parser('nuke',
-                                        help='nuke it from orbit (delete all)')
+    nuke_parser = subparsers.add_parser('nuke', help='nuke it from orbit (delete all)')
     nuke_parser.add_argument('--from-orbit', help="nuke location",
                              required=True, action="store_true")
     return parser
 
 
 def _main():
-    """Stuff happens here."""
+
     parser = _make_parser()
     args = parser.parse_args()
 
     alias b=$GB_DIR/b.py
 
 Replace `/path/to/gb` with real path to where you cloned this repo. 
-Do not add trailing slash to the GB_DIR variable.
+Do not add trailing slash to the GB_DIR variable. You may need to login again to make this work.
 
-Usage instructions
-------------------
+Short usage instuctions
+-----------------------
+
+Use `b add` to save current directoy to bookmarks with current directory name as the bookmark name.
+Use `g name` to jump to that directory from any other directory.
+
+Typical usage
+-------------
+
+For example, you have a project at some deeply nested location: `/home/username/projects/python/django/projectname/`
+
+You go to the directory, and type `b add`
+
+Next time, instead of typing `cd projects/python/django/projectname` you just type `g projectname` :)
+
+Detailed usage instructions
+---------------------------
 
 Use `b -h` to get a list of commands.
 Use `b COMMAND -h` to get help for specific command.
+
+Use `b add` to add current directory to bookmarks. 
+Bookmark name will be the same as the name of the current directory. 
+If the bookmark with the same name already exists, it will __not__ be updated automatically.
+
+Use `b add NAME` to save current directory under specified name.
+
+Use `b add NAME PATH` to save custom path under specified name.
+
+Use `add -u` command to update existing bookmark with new path. 
+You can specify name and path if they are different from current path and directory name.
+
+Use `b del NAME` to delete bookmark with specified name.
+
+Use `b list` to list saved bookmarks.
+
+Use `b nuke --from-orbit` to delete all bookmarks :)
+
+Command `b get NAME` is not meant to be used directly, it is called from `g.sh` file.
+
 Use `g NAME` to jump to the directory saved under the specified name.