Update zshPlug to working version

This commit is contained in:
Robert Morrison 2022-02-20 01:27:08 +00:00
parent acea2aed2c
commit 70822b11da
Signed by: robert
GPG Key ID: 73E012EB3F4EC696
3 changed files with 35 additions and 1 deletions

@ -1 +1 @@
Subproject commit e00c59e0666458d1a4aef42f691fc502622c44f8
Subproject commit 89c2d21b8d75048d29ea1528d33d3ee1ddbd86a1

25
functions/CleanTmp Executable file
View 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
View 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 :