mirror of
https://github.com/notwa/rc
synced 2025-02-05 07:43:22 -08:00
little fixes
This commit is contained in:
parent
1f519900ab
commit
595f5209c4
5 changed files with 7 additions and 3 deletions
|
@ -32,4 +32,6 @@ PROMPT_COMMAND='[ $? = 0 ] && PS1=${ret_succ} || PS1=${ret_fail}'
|
|||
# this doesn't work for all scripts at the moment, but
|
||||
ADDPATH "$HOME/sh"
|
||||
|
||||
alias reload='exec bash'
|
||||
|
||||
unset x
|
||||
|
|
|
@ -66,6 +66,5 @@ alias unwrap='awk '\''BEGIN{RS="\n\n";FS="\n"}{for(i=1;i<=NF;i++)printf "%s ",$i
|
|||
alias picky='{ pacman -Qgq base base-devel | tee -; pacman -Qtnq; } | sort | uniq -u'
|
||||
alias unused='{ pacman -Qt; pacman -Qe | tee -; } | sort | uniq -u'
|
||||
|
||||
#. ~/mingw.sh
|
||||
. ~/sh/lsf.sh/lsf.sh
|
||||
. ~/sh/z/z.sh
|
||||
|
|
1
sh/conv
1
sh/conv
|
@ -2,3 +2,4 @@
|
|||
conv() {
|
||||
printf "%08x\n" $(((0x$1-0x4F920000+0x80000000)^3))
|
||||
}
|
||||
conv $1
|
||||
|
|
|
@ -1,17 +1,17 @@
|
|||
#!/bin/zsh
|
||||
monitor() {
|
||||
local time=$1
|
||||
local cmd=$2
|
||||
local lines=0
|
||||
local elines=0
|
||||
local stop=0
|
||||
shift
|
||||
trap stop=1 INT
|
||||
while [ $stop -eq 0 ]; do
|
||||
[ $lines -gt 1 ] && echo -en "\e[${lines}A"
|
||||
[ $elines -gt 0 ] && echo -en "\e[${elines}A"
|
||||
lines=0
|
||||
elines=0
|
||||
($@ | fold -w $COLUMNS | while read -r; do
|
||||
($cmd | fold -w $COLUMNS | while read -r; do
|
||||
echo -E "$REPLY"
|
||||
let lines++
|
||||
done) 2>&1 | fold -w $COLUMNS | while read -r; do
|
||||
|
@ -21,3 +21,4 @@ monitor() {
|
|||
sleep $time || break
|
||||
done
|
||||
}
|
||||
monitor $1 $2
|
||||
|
|
|
@ -2,3 +2,4 @@
|
|||
unconv() {
|
||||
printf "%08x\n" $(((0x$1^3)&0x00FFFFFF+0x4F920000))
|
||||
}
|
||||
unconv $1
|
||||
|
|
Loading…
Add table
Reference in a new issue