Skip to content

The repo to customize the long zigzag command to save your time

Notifications You must be signed in to change notification settings

sangqle/custom-command

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Quick start

1. For zsh

git clone [email protected]:sangqle/custom-command.git ~/.custom-command
cd ~/.custom-command
chmod +x killport
echo -e "\n# Custom command\nexport PATH=\$HOME/.custom-command/:\$PATH" >> ~/.zshrc
source ~/.zshrc

2. For bash

git clone [email protected]:sangqle/custom-command.git ~/.custom-command
cd ~/.custom-command
chmod +x killport
echo -e "\n# Custom command\nexport PATH=\$HOME/.custom-command/:\$PATH" >> ~/.bashrc
source ~/.bashrc

And then you can use killport command to kill port by port number or range of port

killport 3000 3001 3002

How to load your custom scripts

1. Clone this repo to your home directory

git clone [email protected]:sangqle/custom-command.git ~/.custom-command

2. Grant permission to your script

cd ~/.custom-command
chmod +x <your script here>

Example for killport

chmod +x killport

3. Add the addition source to your .bashrc or .zshrc

// some code above
export PATH=$HOME/.custom-command/:$PATH
// some code below

Or you can one of these command below to append the source into .bashrc or .zshrc

echo -e "\n# Custom command\nexport PATH=\$HOME/.custom-command/:\$PATH" >> ~/.bashrc
echo -e "\n# Custom command\nexport PATH=\$HOME/.custom-command/:\$PATH" >> ~/.zshrc

4. Reload your .bashrc or .zshrc

source ~/.bashrc
source ~/.zshrc

How to use

1. killport

Kill port by port number or range of port

killport 3000 3001 3002

or kill range of port

killport 3000-3002

2. port

Check port is open or not

port 3000

About

The repo to customize the long zigzag command to save your time

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages