Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
T
togepy
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Hideki Shimizu
togepy
Commits
973c5b90
Commit
973c5b90
authored
4 years ago
by
Hideki Shimizu
Browse files
Options
Downloads
Patches
Plain Diff
initial commit
parents
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
bin/activate
+105
-0
105 additions, 0 deletions
bin/activate
with
105 additions
and
0 deletions
bin/activate
0 → 100755
+
105
−
0
View file @
973c5b90
#!/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_
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment