Skip to content

Instantly share code, notes, and snippets.

@Dillie-O
Created June 26, 2017 17:40
Show Gist options
  • Save Dillie-O/793c6bce0372f788b5cb608f9357f35e to your computer and use it in GitHub Desktop.
Save Dillie-O/793c6bce0372f788b5cb608f9357f35e to your computer and use it in GitHub Desktop.
[Remove path values] Remove instances of a directory from PATH #zsh #bash #shell
# Replace `/mnt/c/tools/ruby22/bin` with your path. Additional syntax used so that you don't have to escape path.
PATH=$(echo :$PATH: | sed -e 's,:/mnt/c/tools/ruby22/bin:,:,g' -e 's/^://' -e 's/:$//')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment