mirror of
https://github.com/notwa/rc
synced 2024-05-20 02:43:23 -07:00
use in-place arithmetic where applicable
This commit is contained in:
parent
aaa15067b8
commit
56a5724160
|
@ -42,9 +42,9 @@ ADDPATH "$HOME/sh"
|
|||
> ~/.sh-bash
|
||||
)
|
||||
|
||||
SOURCING=$((SOURCING+1))
|
||||
: $((SOURCING+=1))
|
||||
. ~/.sh-bash
|
||||
SOURCING=$((SOURCING-1))
|
||||
: $((SOURCING-=1))
|
||||
|
||||
# TODO: respect initctl like in .zshrc.
|
||||
alias reload='cd; exec bash'
|
||||
|
|
|
@ -62,9 +62,9 @@ function {
|
|||
[ "$a" = "$b" ] && touch ~/.sh.zwc || zrecompile -p ~/.sh
|
||||
}
|
||||
|
||||
SOURCING=$((SOURCING+1))
|
||||
: $((SOURCING+=1))
|
||||
. ~/.sh
|
||||
SOURCING=$((SOURCING-1))
|
||||
: $((SOURCING-=1))
|
||||
|
||||
local fuzzy=`has fzy || print`
|
||||
|
||||
|
|
4
sh/baks
4
sh/baks
|
@ -3,9 +3,9 @@
|
|||
# YES_BASH
|
||||
# YES_DASH
|
||||
|
||||
#SOURCING=$((SOURCING+1))
|
||||
: $((SOURCING+=1))
|
||||
#. ~/sh/note # FIXME: don't do this?
|
||||
#SOURCING=$((SOURCING-1))
|
||||
: $((SOURCING-=1))
|
||||
|
||||
baks() { # backup, timestamped
|
||||
local ret=0
|
||||
|
|
4
sh/sc
4
sh/sc
|
@ -1,8 +1,8 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
SOURCING=$((SOURCING+1))
|
||||
: $((SOURCING+=1))
|
||||
. ~/sh/ea # FIXME: don't do this? somehow?
|
||||
SOURCING=$((SOURCING-1))
|
||||
: $((SOURCING-=1))
|
||||
|
||||
sc_shorten() {
|
||||
REPLY="${1:2:2}${1:5:2}${1:8:2}${1:11:12}"
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
#!/usr/bin/env bash
|
||||
# YES_ZSH
|
||||
|
||||
#SOURCING=$((SOURCING+1))
|
||||
: $((SOURCING+=1))
|
||||
#. ~/sh/now # FIXME: don't do this?
|
||||
#SOURCING=$((SOURCING-1))
|
||||
: $((SOURCING-=1))
|
||||
|
||||
scropt() {
|
||||
local now=$(now)
|
||||
|
|
Loading…
Reference in New Issue
Block a user