1
0
Fork 0
mirror of https://github.com/notwa/rc synced 2024-06-26 01:07:11 -07:00
This commit is contained in:
Connor Olding 2014-11-12 20:36:15 -08:00
parent 1a563cbd5f
commit 9e393f020b
5 changed files with 10 additions and 16 deletions

View File

@ -2,6 +2,7 @@
# for both zsh and bash
#umask 027 # screw others
umask 022 # don't inherit last umask. pip will break itself.
ADDPATH() {
grep ":$1:" <<<":$PATH:" >/dev/null || export PATH="$PATH:$1"

View File

@ -45,6 +45,7 @@ function {
append_history share_history # across sessions
hist_expire_dups_first # sharing/appending will result in dups
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_pushd # cd acts as pushd
no_match # error on bad tab-complete
@ -54,6 +55,7 @@ function {
complete_in_word # enable tab completion when cursor between words
rc_quotes # 'you''re dumb' like "you're dumb"
brace_ccl # for character ranges like {a-z}
ksh_typeset # treat `local x=$(cmd)` and `x=$(cmd)` the same
)
setopt "${opts[@]}"
unsetopt rm_star_silent rm_star_wait # yolo
@ -64,12 +66,6 @@ autoload -U zmv
zmodload zsh/mathfunc
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
dirprev() {
pushd -q +1

View File

@ -1,5 +0,0 @@
#!/bin/zsh
conv() {
printf "%08x\n" $(((0x$1-0x664C05A0+0x80000000)^0))
}
conv $1

7
sh/isup Normal file
View 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 "$@"

View File

@ -1,5 +0,0 @@
#!/bin/zsh
unconv() {
printf "%08x\n" $(((0x$1^0)&0x00FFFFFF+0x664C05A0))
}
unconv $1