Update zshPlug to working version
This commit is contained in:
parent
acea2aed2c
commit
70822b11da
2
ZshPlug
2
ZshPlug
|
|
@ -1 +1 @@
|
||||||
Subproject commit e00c59e0666458d1a4aef42f691fc502622c44f8
|
Subproject commit 89c2d21b8d75048d29ea1528d33d3ee1ddbd86a1
|
||||||
25
functions/CleanTmp
Executable file
25
functions/CleanTmp
Executable file
|
|
@ -0,0 +1,25 @@
|
||||||
|
##############################
|
||||||
|
# tmp directory cleanup code #
|
||||||
|
# now functionified #
|
||||||
|
# empties ~/tmp #
|
||||||
|
# unless KEEPTMP exists #
|
||||||
|
##############################
|
||||||
|
|
||||||
|
|
||||||
|
function CleanTmp() {
|
||||||
|
## exit if no tmp folder
|
||||||
|
[ ! -d "$HOME/tmp" ] && return
|
||||||
|
## exit if KEEPTMP
|
||||||
|
[ -f "$HOME/tmp/KEEPTMP" ] && return
|
||||||
|
|
||||||
|
## remove tmp
|
||||||
|
## Pipe all output to file
|
||||||
|
rm -rvf $HOME/tmp/* > ~/.cleanupResult 2>&1
|
||||||
|
|
||||||
|
## remove result if cleanup successful
|
||||||
|
status=$?
|
||||||
|
[ $status -eq 0 ] && rm ~/.cleanupResult
|
||||||
|
|
||||||
|
echo "cleaned tmp"
|
||||||
|
} #CleanTmp
|
||||||
|
# vim: set ft=zsh ts=8 sw=4 tw=0 noet :
|
||||||
9
functions/setTermTitle
Normal file
9
functions/setTermTitle
Normal file
|
|
@ -0,0 +1,9 @@
|
||||||
|
|
||||||
|
setTermTitle() {
|
||||||
|
Terminal=$(echo $TERM | cut -d'-' -f1 )
|
||||||
|
[[ -z $1 ]] && Title="$Terminal" || Title="$Terminal - $1"
|
||||||
|
|
||||||
|
echo -e -n '\e]2;'"$Title"'\a'
|
||||||
|
|
||||||
|
}
|
||||||
|
# vim: set ft=zsh ts=8 sw=4 tw=0 noet :
|
||||||
Loading…
Reference in New Issue
Block a user