mirror of
https://github.com/notwa/rc
synced 2025-02-05 07:43:22 -08:00
stuff
This commit is contained in:
parent
1a563cbd5f
commit
9e393f020b
5 changed files with 10 additions and 16 deletions
|
@ -2,6 +2,7 @@
|
||||||
# for both zsh and bash
|
# for both zsh and bash
|
||||||
|
|
||||||
#umask 027 # screw others
|
#umask 027 # screw others
|
||||||
|
umask 022 # don't inherit last umask. pip will break itself.
|
||||||
|
|
||||||
ADDPATH() {
|
ADDPATH() {
|
||||||
grep ":$1:" <<<":$PATH:" >/dev/null || export PATH="$PATH:$1"
|
grep ":$1:" <<<":$PATH:" >/dev/null || export PATH="$PATH:$1"
|
||||||
|
|
|
@ -45,6 +45,7 @@ function {
|
||||||
append_history share_history # across sessions
|
append_history share_history # across sessions
|
||||||
hist_expire_dups_first # sharing/appending will result in dups
|
hist_expire_dups_first # sharing/appending will result in dups
|
||||||
hist_ignore_dups # don't push lines identical to the previous
|
hist_ignore_dups # don't push lines identical to the previous
|
||||||
|
hist_ignore_space # don't push lines beginning with spaces
|
||||||
auto_cd # exec a dir to cd
|
auto_cd # exec a dir to cd
|
||||||
auto_pushd # cd acts as pushd
|
auto_pushd # cd acts as pushd
|
||||||
no_match # error on bad tab-complete
|
no_match # error on bad tab-complete
|
||||||
|
@ -54,6 +55,7 @@ function {
|
||||||
complete_in_word # enable tab completion when cursor between words
|
complete_in_word # enable tab completion when cursor between words
|
||||||
rc_quotes # 'you''re dumb' like "you're dumb"
|
rc_quotes # 'you''re dumb' like "you're dumb"
|
||||||
brace_ccl # for character ranges like {a-z}
|
brace_ccl # for character ranges like {a-z}
|
||||||
|
ksh_typeset # treat `local x=$(cmd)` and `x=$(cmd)` the same
|
||||||
)
|
)
|
||||||
setopt "${opts[@]}"
|
setopt "${opts[@]}"
|
||||||
unsetopt rm_star_silent rm_star_wait # yolo
|
unsetopt rm_star_silent rm_star_wait # yolo
|
||||||
|
@ -64,12 +66,6 @@ autoload -U zmv
|
||||||
zmodload zsh/mathfunc
|
zmodload zsh/mathfunc
|
||||||
autoload -Uz zcalc
|
autoload -Uz zcalc
|
||||||
|
|
||||||
isup() {
|
|
||||||
local c
|
|
||||||
curl -sLI -w '%{http_code}' -o /dev/null "$1" | read -r c
|
|
||||||
[ "${c:0:1}" -eq 2 ]
|
|
||||||
}
|
|
||||||
|
|
||||||
DIRSTACKSIZE=24
|
DIRSTACKSIZE=24
|
||||||
dirprev() {
|
dirprev() {
|
||||||
pushd -q +1
|
pushd -q +1
|
||||||
|
|
5
sh/conv
5
sh/conv
|
@ -1,5 +0,0 @@
|
||||||
#!/bin/zsh
|
|
||||||
conv() {
|
|
||||||
printf "%08x\n" $(((0x$1-0x664C05A0+0x80000000)^0))
|
|
||||||
}
|
|
||||||
conv $1
|
|
7
sh/isup
Normal file
7
sh/isup
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
#!/usr/bin/zsh
|
||||||
|
isup() {
|
||||||
|
local c
|
||||||
|
curl -sLI -w '%{http_code}' -o /dev/null "$1" | read -r c
|
||||||
|
[ "${c:0:1}" -eq 2 ]
|
||||||
|
}
|
||||||
|
isup "$@"
|
|
@ -1,5 +0,0 @@
|
||||||
#!/bin/zsh
|
|
||||||
unconv() {
|
|
||||||
printf "%08x\n" $(((0x$1^0)&0x00FFFFFF+0x664C05A0))
|
|
||||||
}
|
|
||||||
unconv $1
|
|
Loading…
Add table
Reference in a new issue