<commit_before>dnav: Directory Navigator
=========================

The Problem
-----------

When working on various projects on a linux system, there are several
directories that one is likely to going to be jumping between at any
given time.  Changing between these directories can be a pain and
existing tools like `pushd` and `popd` provide support for going back
to directories that were previously pushed onto a stack.

Wouldn't it be nice if there were a command-line tool that would...

1. Allow me to jump to a directory quickly based on an alias I define?
2. Remember these aliases across shell sessions?
3. Provide familiar commands for managing directory aliases?

You're in luck.  This is what dnav is designed to provide.  Instead of
managing your directories on a stack, now you have a hash table and
you can get, put, go, rm, and clear aliases in this table with simple
commands.

Install It
----------

Install dnav by cloning the git repo to your home directory as follows

    $ git clone https://github.com/posborne/dnav ~/.dnav

Enable shell integration (which allows dnav to modify your current
working directory) by adding the following to your `.bashrc`,
`.zshrc`, or other shell configuration file.

    source ~/.dnav/dnav.sh

That's it.  Don't forget to restart your shell or re-source your shell
init for the update to take effect.  To test, you should be able to
run the following:

    dnav help

How Does It Work
----------------

`dnav` has two main pieces:

1. A shell script which is sourced in your shell environment that
   provides the `dnav` command.  This is necessary for `dnav` to
   change your current working directory.
2. A python scipt that implements the core functionality of `dnav`
   which is called out to by the shell function.

The only state used by `dnav` is a set of symlinks that are stored in
`~/.dnav/symlinks`.  The various `dnav` commands are just operations
on the symlinks in this directory.  For instance, the command `dnav<commit_msg>docs: fix incorrect command in README<commit_after>dnav: Directory Navigator
=========================

The Problem
-----------

When working on various projects on a linux system, there are several
directories that one is likely to going to be jumping between at any
given time.  Changing between these directories can be a pain and
existing tools like `pushd` and `popd` provide support for going back
to directories that were previously pushed onto a stack.

Wouldn't it be nice if there were a command-line tool that would...

1. Allow me to jump to a directory quickly based on an alias I define?
2. Remember these aliases across shell sessions?
3. Provide familiar commands for managing directory aliases?

You're in luck.  This is what dnav is designed to provide.  Instead of
managing your directories on a stack, now you have a hash table and
you can get, put, go, rm, and clear aliases in this table with simple
commands.

Install It
----------

Install dnav by cloning the git repo to your home directory as follows

    $ git clone https://github.com/posborne/dnav ~/.dnav

Enable shell integration (which allows dnav to modify your current
working directory) by adding the following to your `.bashrc`,
`.zshrc`, or other shell configuration file.

    source ~/.dnav/dnav.sh

That's it.  Don't forget to restart your shell or re-source your shell
init for the update to take effect.  To test, you should be able to
run the following:

    dnav --help

How Does It Work
----------------

`dnav` has two main pieces:

1. A shell script which is sourced in your shell environment that
   provides the `dnav` command.  This is necessary for `dnav` to
   change your current working directory.
2. A python scipt that implements the core functionality of `dnav`
   which is called out to by the shell function.

The only state used by `dnav` is a set of symlinks that are stored in
`~/.dnav/symlinks`.  The various `dnav` commands are just operations
on the symlinks in this directory.  For instance, the command `dnav
{'fraction_non_alphanumeric': 0.07728628230616302, 'fraction_numerical': 0.002485089463220676, 'mean_word_length': 3.5738636363636362, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '549606', 'n_tokens_mistral': 1069, 'n_tokens_neox': 1038, 'n_words': 626}