Skip to content
This repository was archived by the owner on May 7, 2021. It is now read-only.

aptlin/dirabbrev

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

dirabbrev – dynamic management of directory paths

Thank you, Carsten Dominik, for your work and inspiration. See Carsten’s original script.

dirabbrev is a compact Perl script to abbreviate and manage long directory paths.

The user is free to assign any alias to a desired path using a shell command or a configuration file, by default located at ~/.dirabbrev. dirabbrev then automatically saves the alias and the corresponding environment variable.

Abbreviations are reinstalled in every new instance of a shell.

Requirements

Perl 5.003 or higher

Supported Shells

  • sh
  • bash
  • zsh
  • fish
  • csh
  • tcsh
  • ksh

Installation

Choose a home directory for the script

You may want to save the file to your directory $USR_SCRIPTS with useful scripts, like ~/.bin or ~/.scripts, for example.

Download the script.

wget:

wget https://raw.githubusercontent.com/sdll/dirabbrev/master/dirabbrev

curl:

curl -O https://raw.githubusercontent.com/sdll/dirabbrev/master/dirabbrev

Add the dirabbrev script to $PATH

If required, manually edit .dirabbrev aliases

The syntax for .dirabbrev is simple. For a directory at /path/to/dir and the corresponding alias shortened_name, add the following line:

shortened_name /path/to/dir

Source .dirabbrev aliases

bash/zsh

eval $(dirabbrev -a -e -d)

fish

eval (dirabbrev -a -e -d)

About

dynamic management of directory paths

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages