Metadata-Version: 2.1
Name: term-mark
Version: 0.1.5
Summary: Bookmarks for your terminal
Author: Andrew Stone
License: Copyright (c) 2023 Andrew Stone
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
Project-URL: Homepage, https://github.com/exastone/term-mark
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Topic :: System :: Shells
Classifier: Topic :: Terminals
Classifier: Topic :: Utilities
Requires-Python: >=3.7
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: pfzy >=0.3.4
Requires-Dist: prompt-toolkit >=3.0.39

# term-mark • bookmarks for your terminal 📚

Bookmark directories to quickly jump to them later, no more tabbing through directories!

![Jump to path](https://github.com/exastone/term-mark/blob/dev/assets/demo-mark-long-path.gif)

## Install

> `pip install term-mark`

> `term-mark --init`

A shell function, 'tm.zsh' will be created in `$HOME/.config/zsh/zsh_functions` and appended as a source to your .zshrc file. 

**You'll likely need to reload your .zshrc file before using `tm`**

> `source $HOME/.zshrc`

You can now use term-mark with `'tm'` !

### Disable Glyphs

By default, glyphs are used for markers. If your shell doesn't support glyphs or your not using a 
patched font, you can disable glyphs by setting an environment variable which will use '●', '○' characters as fallback marker icons. i.e.

add `export TM_USE_GLYPHS=false` to your .zshrc file

run `source ~/.zshrc`

## Usage

- Bookmark (toggle) the current directory: `tm -M` / `--mark`
- Show bookmarks: `tm -S` / `--show`
- Remove bookmarks (interactive) menu: `tm -R` / `--remove`
    - useful for removing multiple bookmarks at the same time

**Auto-find & Add Bookmarks:**

You can use `tm --find <base dir> [--depth <number>]` to search and add bookmarks for project directories (idenitifed by .git folder) under the base path provided.

e.g. you can run `tm --find ~/dev` (--depth 2 is default)
to automatically add bookmarks to **dirA**, **dirB**, **dirC** directories

```
./dev
├── dirA          [bookmark added for `dirA`]
│   ├── .git            [<- .git found]
│   └── ...
├── dirB          [bookmark added for `dirB`]
│   ├── .git            [<- .git found]
│   ├── ...
│   ├── src             [bookmark NOT added `/dirB/src`]
│   |   └── ...
│   └── .vscode         [bookmark NOT added `.vscode`]
│       └── ...
├── GO
│   └── dirC      [bookmark added for `dirC`]
│       ├── .git        [<- .git found]
│       ├── .vscode
|       |   └── ...
│       └── ...
└── ...
```

## Uninstall

`pip uninstall term-mark`

Remove the following line from your .zshrc file:

`source "$HOME/.config/zsh/zsh_functions/tm.zsh"`

Delete the shell function:

`rm $HOME/.config/zsh/zsh_functions/tm.zsh`


There's only 2 dependencies for term-mark, `pfzy` and `prompt-toolkit`
If they're not used by another package you can also pip uninstall these for a completely clean
uninstall.

## Attribution

This CLI tool includes code and components from the [InquirerPy](https://github.com/kazhala/InquirerPy) package created
by kazhala, specifically a fork from [Gracer](https://github.com/Gracecr/InquirerPy)

InquirerPy is a powerful Python library for creating interactive command-line interfaces.
