Taking out plugins

I might find something later
This commit is contained in:
Nathan Stilwell 2017-04-12 00:39:38 -04:00
commit 4c9a66ced2
No known key found for this signature in database
GPG key ID: 47459090870D1391
4 changed files with 0 additions and 256 deletions

View file

@ -9,20 +9,6 @@ for config_file ($ZSH/lib/*.zsh); do
source $config_file
done
is_plugin() {
local base_dir=$1
local name=$2
test -f $base_dir/plugins/$name/$name.plugin.zsh \
|| test -f $base_dir/plugins/$name/_$name
}
# Add all defined plugins to fpath. This must be done
# before running compinit.
for plugin ($plugins); do
if is_plugin $ZSH $plugin; then
fpath=($ZSH/plugins/$plugin $fpath)
fi
done
# Figure out the SHORT hostname
if [ -n "$commands[scutil]" ]; then
# OS X
@ -38,14 +24,6 @@ ZSH_COMPDUMP="${ZDOTDIR:-${HOME}}/.zcompdump-${SHORT_HOST}-${ZSH_VERSION}"
autoload -U compinit
compinit -i -d "${ZSH_COMPDUMP}"
# Load all of the plugins that were defined in ~/.zshrc
# for plugin ($plugins); do
# if [ -f $ZSH_CUSTOM/plugins/$plugin/$plugin.plugin.zsh ]; then
# source $ZSH_CUSTOM/plugins/$plugin/$plugin.plugin.zsh
# elif [ -f $ZSH/plugins/$plugin/$plugin.plugin.zsh ]; then
# source $ZSH/plugins/$plugin/$plugin.plugin.zsh
# fi
# done
# load theme
test -f "$ZSH/themes/$THEME" && source "$ZSH/themes/$THEME"

View file

@ -1,75 +0,0 @@
#!/usr/bin/env bash
function atlas_usage {
cat <<-USAGE
usage: atlas command [map name]
new Create new hosts map file
init Create ~/.hosts to store host maps in
map link /etc/hosts to map supplying map name
list show what host configs exist
show show which config is linked
USAGE
}
function atlas_new {
if [ -z "$1" ]; then
echo "need a name of new map";
else
if [[ -e "/Users/nstilwell/.hosts/template" ]]; then
cp /Users/nstilwell/.hosts/template ~/.hosts/$1;
else
touch ~/.hosts/$1;
fi
echo "Created $1 at ~/.hosts/$1";
fi
}
function atlas_init {
if [ ! -d "/Users/nstilwell/.hosts" ]; then
mkdir /Users/nstilwell/.hosts;
fi
echo "Atlas initialized";
}
function atlas_map {
if [ -d "/Users/nstilwell/.hosts" ] && [ -e "/Users/nstilwell/.hosts/$1" ]; then
sudo ln -f /Users/nstilwell/.hosts/$1 /etc/hosts;
echo "mapped ~/.hosts/$1 to /etc/hosts";
else
echo "$1 doesn't exist at ~/.hosts/$1";
fi
}
function atlas_show {
if [ -d "/Users/nstilwell/.hosts" ] && [ -e "/Users/nstilwell/.hosts/" ]; then
head -n 4 /etc/hosts;
else
echo "Atlas not initialized";
atlas_usage;
fi
}
function atlas_list {
if [ -d "/Users/nstilwell/.hosts" ] && [ -e "/Users/nstilwell/.hosts/" ]; then
ls -F ~/.hosts | grep -v /$;
else
echo "Atlas not initialized";
atlas_usage;
fi
}
function atlas {
if [ -z "$1" ]; then
atlas_usage;
else
[ "$1" = "new" ] && atlas_new "$2";
[ "$1" = "init" ] && atlas_init;
[ "$1" = "map" ] && atlas_map "$2";
[ "$1" = "show" ] && atlas_show;
[ "$1" = "list" ] && atlas_list;
fi
}

View file

@ -1,49 +0,0 @@
function dock_usage () {
cat <<-USAGE
usage: dock <command>
clean Remove all stopped containers
help show Docker cheat sheet
USAGE
}
function dock_clean {
docker rm $(docker ps -a -q);
[ "$1" = "images" ] && docker rmi $(docker images -q);
}
function dock_help {
cat <<-HELP
# list local images
docker images
# build a tagged docker image;
docker build -t <tag name> <folder>;
# run a docker image as a daemon on a port;
docker run -d --name <give it a name> -p <inside port : outside port> <tag>;
# run bash in a container;
docker exec -ti <name, tag, or id> bash;
# remove an image
docker rmi <tag, name, id>
# remove a container
docker rm <tag, name, id>
# view logs from a container
docker logs -f <tag, name, id>
HELP
}
function dock () {
if [ -z "$1" ]; then
dock_usage;
else
[ "$1" = "clean" ] && dock_clean "$2"
[ "$1" = "help" ] && dock_help
fi
}

View file

@ -1,110 +0,0 @@
function gerrit_usage {
echo
echo " usage: gerrit <command>"
echo
echo " try these :";
echo " push Push changes without going through a review. ";
echo " pull Pull latest changes and rebase ... or something. ";
echo " patch Work with gerrit patchset";
echo " reset Reset hard to origin/master";
echo " review Submit changes for review";
echo " draft Submit changes for review as draft";
echo " clone Clone a repo from gerrit, requires repo name";
echo " setup Add gerrit commit hook to a repo";
echo
}
function gerrit_patch_usage () {
echo
echo " usage: gerrit patch <command>";
echo
echo " try these :";
echo
echo " commit Amend the patchset commit";
echo " review Submit patchset back to the gerrit for review";
echo " draft Submit patchset back to the gerrit for review as draft";
echo " rebase Rebase onto master into patchset";
echo
}
function gerrit_push () {
git push origin HEAD:refs/heads/$1;
}
function gerrit_review () {
git push origin HEAD:refs/for/$1;
}
function gerrit_draft () {
git push origin HEAD:refs/drafts/$1;
}
function gerrit_reset {
git reset --hard origin/master;
}
function gerrit_pull () {
#git pull --rebase origin $1;
git fetch;
git rebase origin/$1
}
function gerrit_patch () {
if [ -z "$1" ]; then
gerrit_patch_usage;
else
[ "$1" = "commit" ] && git commit --amend;
[ "$1" = "review" ] && gerrit_review "master";
[ "$1" = "draft" ] && gerrit_draft "master";
[ "$1" = "rebase" ] && gerrit_pull "master";
fi
}
function gerrit_clone () {
if [ -z "$1" ]; then
echo "$yellow Please supply the name of a repo to clone. $stop"
else
if [[ -n $(which gg-gerrit-clone) ]]; then
gg-gerrit-clone "$1"
else
git clone --recursive ssh://gerrit_host/$1
fi
fi
}
function gerrit_setup () {
if [ -d /web/tools/bin/install-hooks ]; then
# install hooks
/web/tools/bin/install-hooks;
if [[ $? -eq 0 ]]; then
echo "$green Gerrit hook installed. $stop";
else
echo "$red Couldn't install Gerrit hook. $stop";
fi
fi
}
function gerrit () {
gitRemoteUrl=`git config --get remote.origin.url`;
ref=$(git symbolic-ref HEAD 2> /dev/null);
branch=${ref#refs/heads/};
if [ -z "$1" ]; then
gerrit_usage;
else
[ "$1" = "clone" ] && gerrit_clone "$2";
if [[ $gitRemoteUrl != *"gerrit"* ]]; then
echo "This repository isn't on Gerrit Host.";
return;
fi
[ "$1" = "patch" ] && gerrit_patch "$2"
[ "$1" = "push" ] && gerrit_push "$branch";
[ "$1" = "review" ] && gerrit_review "$branch";
[ "$1" = "reset" ] && gerrit_reset;
[ "$1" = "draft" ] && gerrit_draft "$branch";
[ "$1" = "pull" ] && gerrit_pull "$branch";
[ "$1" = "setup" ] && gerrit_setup;
fi
}