Skip to content

An oh-my-zsh tool plugin to switch different host modes.

Notifications You must be signed in to change notification settings

LockonS/host-switch

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

host-switch

A zsh plugin for quickly switch hostfile and refresh dns cache

Usage

Step 1

  • Download this plugin and place it in path-to-zsh/custom/plugin

Step 2

  • Activate the plugin by adding host-switchin plugins in your config file

Step 3

  • Setup hostfiles

    1. Be advised, before setting up this plugin, remember to backup your original file /etc/hosts as you might already add a few custom host setting into you hosts file. This plugin works as a tiny tool to help you switch between several hosts files.

    2. Add host file to be switched in hostfile folder, and rename the file like hosts.dev. Switching current hosts file to hosts.dev reqires this command. Filename extension was used as the arguments to match files.

     hostswitch dev
    1. Use hoststatus to check which host script is being used currently.
    2. Changes might take effect in several minutes so you might need to reset your DNS cache.

About

An oh-my-zsh tool plugin to switch different host modes.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages