Skip to main content

A tool to temporarily save and go to a working directory

Project description

twd-m4sc0

twd-m4sc0 is a command-line tool that allows you to temporarily save a working directory and easily navigate back to it. It's designed for developers and all users who frequently need to switch between directories in the terminal.

Features

  • Save the current working directory.
  • Go back to the saved directory.
  • List the saved directory.
  • Integrates with your shell for seamless directory management.

Installation

Installation using pip:

  1. Install the package from the pypi repository:
pip install twd-m4sc0
  1. Add the following line to your .bashrc or .zshrc to set up the shell function:
eval $(python3 -m twd --shell)
  1. Exit and reopen the terminal or reload using:
source ~/.bashrc
# or
source ~/.zshrc

Usage

  • Save a directory
twd -s [path]
  • Go to the saved directory
twd -g
  • List the saved directory
twd -l
  • Unset the TWD and delete the file
twd -u

Optional Parameters

Simple Output

Simpler output is meant to be for script or grep usage

  • Example with simple-output
user:~/.config $ twd -s --simple-output
/home/user/.config
  • Example without simple-output
user:~/.config $ twd -s
Saved TWD to /home/user/.config

No Output

No output is meant for just no output (impressive ik)

  • Example with no-output
user:~/.config $ twd -s --no-output
# no output
  • Example without no-output
user:~/.config $ twd -s
Saved TWD to /home/user/.config

Force

Forces an action

Currently only implemented on the -u flag

  • Example
user:~/.config $ twd -u --force
TWD File deleted and TWD unset

Contribution

To set up a dev environment:

  1. Clone the repo:
git clone https://github.com/m4sc0/twd
cd twd
  1. Install the package in editable mode using pip:
pip install -e .

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

twd_m4sc0-1.5.1.tar.gz (5.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

twd_m4sc0-1.5.1-py3-none-any.whl (6.4 kB view details)

Uploaded Python 3

File details

Details for the file twd_m4sc0-1.5.1.tar.gz.

File metadata

  • Download URL: twd_m4sc0-1.5.1.tar.gz
  • Upload date:
  • Size: 5.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.9.20

File hashes

Hashes for twd_m4sc0-1.5.1.tar.gz
Algorithm Hash digest
SHA256 7133e58a93553e580c3189f7f6f448f4b73cba191e614e7be65fd7563bb1cb39
MD5 d0fab995f90dd8c82a93cb38c3e6d5d9
BLAKE2b-256 e957271cfaf5a19d687cb74e456783f53e629281c73ccf3fa73d687a3dc6eee7

See more details on using hashes here.

File details

Details for the file twd_m4sc0-1.5.1-py3-none-any.whl.

File metadata

  • Download URL: twd_m4sc0-1.5.1-py3-none-any.whl
  • Upload date:
  • Size: 6.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.9.20

File hashes

Hashes for twd_m4sc0-1.5.1-py3-none-any.whl
Algorithm Hash digest
SHA256 4d473402bc068c20c1448a1b3740ae7f3786a620d39dcf1eec22aa2d6d8b8390
MD5 0c1a31b8d726f1466b8e3d2bb6d1b16a
BLAKE2b-256 2497f5e848982bdb1c22215bb6079b42fb77d94f37f6ef76c6febe61fb4996be

See more details on using hashes here.

Supported by

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