Skip to content
Snippets Groups Projects
Commit 973c5b90 authored by Hideki Shimizu's avatar Hideki Shimizu
Browse files

initial commit

parents
Branches
Tags
No related merge requests found
#!/bin/zsh
###############################
#
# # roll
# - define envirnment variables
# - ANALYZER_DIR
# - A directory for each analysis
# - TOGEPY_DIR
# - usually $ANALYZER_DIR/togepy or specific
#
# - around zsh settings
#
###############################
ANALYZER_DIR=`pwd`
echo "set working directory at $ANALYZER_DIR"
if [ -z "$TOGEPY_DIR" ]; then
TOGEPY_DIR=$ANALYZER_DIR/togepy
fi
echo "exporting PATH : $ANALYZER_DIR/bin"
echo "exporting ROOT_INCLUDE_PATH : $ANALYZER_DIR/class"
export PATH=$ANALYZER_DIR/bin:$PATH
export ROOT_INCLUDE_PATH=$ANALYZER_DIR/class
zstyle ':completion:*' completer _complete _ignored
autoload -U compinit
compinit
compdef _definedhist hist.delete hist.change_bins
_definedhist(){
if (( CURRENT == 2 )) ;then
hist=($(cat $ANALYZER_DIR/bin/list/hist.list | sed "1d" | awk '{print $3}' | sed "s/{o}//g"))
_describe -t commands "Defined histograms" hist
else
_files
fi
return 1;
}
compdef _setdet det.on det.off
_setdet(){
if (( CURRENT == 2 )) ;then
hist=($(cat $ANALYZER_DIR/bin/list/SetDetector.list | awk '{print $1}'))
_describe -t commands "Detectors" hist
else
_files
fi
return 1;
}
compdef _sethistcmd hist.set
_sethistcmd(){
histo=($(diff <(cat $ANALYZER_DIR/bin/list/hist.list | sed "1d" | awk '{print $3}' | sed '/^$/d
' | sed "s/{o}//g" | sort) <(cat $ANALYZER_DIR/bin/list/set.list | sed "1d" | sort | awk '{print $1
}') | sed "1d" | awk '{print $2}' | sed "s/{o}//g"))
# compadd ${histo[@]}
_describe -t commands "Choose histograms you want to set" histo
return 1;
}
compdef _releasehist hist.release
_releasehist(){
histog=($(cat $ANALYZER_DIR/bin/list/set.list | sed "1d" | sort | awk '{print $1}' | sed "s/{o}//
g"))
# compadd ${histog[@]}
_describe -t commands "Choose histograms you want to release" histog
return 1;
}
autoload -Uz vcs_info
setopt prompt_subst
zstyle ':vcs_info:git:*' check-for-changes true
zstyle ':vcs_info:git:*' stagedstr "%F{yellow}!"
zstyle ':vcs_info:git:*' unstagedstr "%F{red}+"
zstyle ':vcs_info:*' formats "%F{green}%c%u[%b]%f"
zstyle ':vcs_info:*' actionformats '[%b|%a]'
precmd () { vcs_info }
PROMPT=%B%F{cyan}shimiz%b%f" %F{green}at%f %B%F{cyan}$HOST%b%f%F{green}:%f %F{yellow}%d%f %B%F{white}${vcs_info_msg_0_}%b%f
%B%F{gray}*%b%f%(?.%B%F{white}%D %T%b%f.%B%F{red}%D %T%b%f) %F{green}$%f "
RPROMPT="- %f %B%F{cyan}Analyzer%b%f "
_success_(){
cat bin/activate.txt
echo "The analyzer has been successfully activated!"
printf "\e[33:1m Analyzer Groopy has been awakened by you.\e[m\n"
printf "\e[33:1m"
cat << EOF
##################################################
##### #####
##### Analyzer ver. 0.1.0 #####
##### #####
##################################################
EOF
printf "\e[m\n"
echo "please find the usage, analyze -h"
}
_success_
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment