Skip to main content

Bookmarks for your terminal

Project description

term-mark • bookmarks for your terminal 📚

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

Jump to path

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 package created by kazhala, specifically a fork from Gracer

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

term-mark-0.1.5.tar.gz (37.0 kB view hashes)

Uploaded Source

Built Distribution

term_mark-0.1.5-py3-none-any.whl (51.9 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page