Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/foxleigh81/unwrap-zsh-plugin
A ZSH plugin that lets you move items into a parent directoy and then delete the original directory with a single command
https://github.com/foxleigh81/unwrap-zsh-plugin
oh-my-zsh oh-my-zsh-plugin shell shell-script zsh zsh-plugin
Last synced: 2 months ago
JSON representation
A ZSH plugin that lets you move items into a parent directoy and then delete the original directory with a single command
- Host: GitHub
- URL: https://github.com/foxleigh81/unwrap-zsh-plugin
- Owner: foxleigh81
- License: gpl-3.0
- Created: 2022-02-25T20:49:14.000Z (almost 3 years ago)
- Default Branch: master
- Last Pushed: 2022-02-26T20:58:19.000Z (almost 3 years ago)
- Last Synced: 2024-06-22T05:03:30.498Z (7 months ago)
- Topics: oh-my-zsh, oh-my-zsh-plugin, shell, shell-script, zsh, zsh-plugin
- Language: Shell
- Homepage:
- Size: 24.4 KB
- Stars: 6
- Watchers: 2
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# 📁 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:
```bash
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](https://ko-fi.com/img/githubbutton_sm.svg)](https://ko-fi.com/I3I21FRCN)