projects
/
dotfiles
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
ed650cd
)
updated the function I use to go to venv, can be better-ized. added a function to...
author
patrick nsukami
<ndkpatt@gmail.com>
Thu, 18 Dec 2014 21:22:35 +0000
(21:22 +0000)
committer
patrick nsukami
<ndkpatt@gmail.com>
Thu, 18 Dec 2014 21:22:35 +0000
(21:22 +0000)
.bash_function
patch
|
blob
|
history
diff --git
a/.bash_function
b/.bash_function
index
7573006
..
f66e66a
100644
(file)
--- a/
.bash_function
+++ b/
.bash_function
@@
-2,6
+2,11
@@
# my weird function file
# lots of this coming from http://www.kfirlavi.com/blog/2012/11/14/defensive-bash-programming
# my weird function file
# lots of this coming from http://www.kfirlavi.com/blog/2012/11/14/defensive-bash-programming
+my_copy_to_clipboard() {
+ local filecontent=$1
+ [ -f $file ] && xclip -sel clip < $filecontent
+}
+
my_usage() {
cat <<-EOF
my_usage() {
cat <<-EOF
@@
-87,15
+92,17
@@
not_begin_by () {
grep -v "^"$by
}
grep -v "^"$by
}
-my_
venv_list
(){
+my_
list_venv
(){
ls $HOME"/envs"
}
ls $HOME"/envs"
}
-my_
venv_goto
() {
+my_
goto_venv
() {
local dir=$1
local env=$HOME"/envs/"$dir"/source/"
local dir=$1
local env=$HOME"/envs/"$dir"/source/"
- cd $env
- source activate
+ #if source dir not exists, create & cd
+ [ -d $env ] && cd $env || mkdircd -p $env
+ # activate virtualenv
+ source $HOME"/envs/"$dir"/bin/activate"
}
# Taken from http://aaroncrane.co.uk/2009/03/git_branch_prompt/
}
# Taken from http://aaroncrane.co.uk/2009/03/git_branch_prompt/