Skip to content

A ZSH plugin that lets you move items into a parent directoy and then delete the original directory with a single command

License

Notifications You must be signed in to change notification settings

foxleigh81/unwrap-zsh-plugin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

📁 Unwrap: A plugin for ZSH

This simple plugin allows you to remove a directory without removing its contents.

Usage

In your zsh command line, navigate into the directory you want to unwrap, then type unwrap. You will be given a prompt to confirm the action and if you confirm, unwrap will remove the current directory and move all of its contents into the parent folder.

Installation

If you are using oh-my-zsh:

Copy the unwrap folder to .oh-my-zsh/custom/plugins, for example:

cd ~/.oh-my-zsh/custom/plugins
git clone [email protected]:foxleigh81/unwrap-zsh-plugin.git unwrap

Enable the plugin in your .zshrc file. Edit ~/.zshrc to activate the plugin, for example: plugins=(unwrap) And restart the terminal to apply (or just type source ~/.zshrc).

Protected Directories

Unwrap will not remove any directories that are in the root of your system (or any directory with the same name as one of those folders). Nor will it remove the users home directory.

You can add custom-protected directories by creating an .unwrap file in your home directory. The file should contain a list of directories to protect.

An example of a .unwrap file can be found in the plugin install directory.

If your folder is not covered by the above, use unwrap with caution.

A warning about folder names

Unwrap protection is case-sensitive and will not protect folders that have a space, dash or other special character in their name. It will, however, work fine with folders that have an underscore in their name.

Support

If you like this plugin, I'm glad. I just wanted to make something useful :) However, if you wanted to buy me a coffee, I certainly won't say no.

ko-fi

About

A ZSH plugin that lets you move items into a parent directoy and then delete the original directory with a single command

Topics

Resources

License

Stars

Watchers

Forks

Sponsor this project

Packages

No packages published

Languages