diff options
| author | 2022-04-10 20:19:59 -0400 | |
|---|---|---|
| committer | 2022-04-10 20:19:59 -0400 | |
| commit | 36500b5c9b46fe0bf01d114d91301a1ab9c746b5 (patch) | |
| tree | b0f804063c0b5d6f4c69e2f6e5069cfdc3923b45 /dot_local/lib | |
| parent | this is cursed and I am not sorry (diff) | |
do you understand the sheer level of cursedness this is?
I thought not
Diffstat (limited to '')
| -rw-r--r-- | dot_local/lib/sh/bat | 3 | ||||
| -rw-r--r-- | dot_local/lib/sh/bsdtar | 2 | ||||
| -rw-r--r-- | dot_local/lib/sh/colordiff | 3 | ||||
| -rw-r--r-- | dot_local/lib/sh/date | 2 | ||||
| -rw-r--r-- | dot_local/lib/sh/docker | 9 | ||||
| -rw-r--r-- | dot_local/lib/sh/docker.fish | 9 | ||||
| -rw-r--r-- | dot_local/lib/sh/exa | 7 | ||||
| -rw-r--r-- | dot_local/lib/sh/hascmd | 1 | ||||
| -rw-r--r-- | dot_local/lib/sh/hascmd.fish | 1 | ||||
| -rw-r--r-- | dot_local/lib/sh/iproute2 | 2 | ||||
| -rw-r--r-- | dot_local/lib/sh/jump | 5 | ||||
| -rw-r--r-- | dot_local/lib/sh/jump.fish | 2 | ||||
| -rw-r--r-- | dot_local/lib/sh/luarocks | 3 | ||||
| -rw-r--r-- | dot_local/lib/sh/luarocks.fish | 3 | ||||
| -rw-r--r-- | dot_local/lib/sh/rg | 2 | ||||
| -rw-r--r-- | dot_local/lib/sh/skim | 2 | ||||
| -rw-r--r-- | dot_local/lib/sh/ssh | 2 | ||||
| -rw-r--r-- | dot_local/lib/sh/ugrep | 8 | ||||
| -rw-r--r-- | dot_local/lib/sh/xh | 3 |
19 files changed, 69 insertions, 0 deletions
diff --git a/dot_local/lib/sh/bat b/dot_local/lib/sh/bat new file mode 100644 index 0000000..6ac64f8 --- /dev/null +++ b/dot_local/lib/sh/bat @@ -0,0 +1,3 @@ +. hascmd bat || return +alias cat=bat +alias c='bat -pp' diff --git a/dot_local/lib/sh/bsdtar b/dot_local/lib/sh/bsdtar new file mode 100644 index 0000000..a5ca6e5 --- /dev/null +++ b/dot_local/lib/sh/bsdtar @@ -0,0 +1,2 @@ +. hascmd bsdtar || return +alias tar=bsdtar diff --git a/dot_local/lib/sh/colordiff b/dot_local/lib/sh/colordiff new file mode 100644 index 0000000..d14132f --- /dev/null +++ b/dot_local/lib/sh/colordiff @@ -0,0 +1,3 @@ +. hascmd colordiff || return +alias diff=colordiff +alias dif='colordiff -u' diff --git a/dot_local/lib/sh/date b/dot_local/lib/sh/date new file mode 100644 index 0000000..2c9e297 --- /dev/null +++ b/dot_local/lib/sh/date @@ -0,0 +1,2 @@ +. hascmd date || return +alias weekdate="date '+%W %a'" diff --git a/dot_local/lib/sh/docker b/dot_local/lib/sh/docker new file mode 100644 index 0000000..a7ccf0a --- /dev/null +++ b/dot_local/lib/sh/docker @@ -0,0 +1,9 @@ +if . hascmd podman; then + alias docker=podman +elif . hascmd docker; then +else + return +fi + +alias dit='docker run -it --rm' +alias drun='dit -v "$(pwd)":/pwd:Z -w /pwd' diff --git a/dot_local/lib/sh/docker.fish b/dot_local/lib/sh/docker.fish new file mode 100644 index 0000000..e04437b --- /dev/null +++ b/dot_local/lib/sh/docker.fish @@ -0,0 +1,9 @@ +if . hascmd podman + alias docker=podman +else if . hascmd docker +else + return +end + +alias dit='docker run -it --rm' +alias drun='dit -v (pwd):/pwd:Z -w /pwd' diff --git a/dot_local/lib/sh/exa b/dot_local/lib/sh/exa new file mode 100644 index 0000000..4fcfc31 --- /dev/null +++ b/dot_local/lib/sh/exa @@ -0,0 +1,7 @@ +. hascmd exa || return +alias ls=exa +alias l='exa -l' +alias ll='exa -l' +alias la='exa -la' + +alias tree='exa -T' diff --git a/dot_local/lib/sh/hascmd b/dot_local/lib/sh/hascmd new file mode 100644 index 0000000..994bc71 --- /dev/null +++ b/dot_local/lib/sh/hascmd @@ -0,0 +1 @@ +test -x "$(command -v $1)" diff --git a/dot_local/lib/sh/hascmd.fish b/dot_local/lib/sh/hascmd.fish new file mode 100644 index 0000000..9d566c8 --- /dev/null +++ b/dot_local/lib/sh/hascmd.fish @@ -0,0 +1 @@ +type -qf $argv diff --git a/dot_local/lib/sh/iproute2 b/dot_local/lib/sh/iproute2 new file mode 100644 index 0000000..18a0dd0 --- /dev/null +++ b/dot_local/lib/sh/iproute2 @@ -0,0 +1,2 @@ +. hascmd ip || return +alias ip='ip -c=auto' diff --git a/dot_local/lib/sh/jump b/dot_local/lib/sh/jump new file mode 100644 index 0000000..8df5747 --- /dev/null +++ b/dot_local/lib/sh/jump @@ -0,0 +1,5 @@ +. hascmd jump || return + +# this generally won't be used +# in favor of explicit versions +eval "$(jump shell)" diff --git a/dot_local/lib/sh/jump.fish b/dot_local/lib/sh/jump.fish new file mode 100644 index 0000000..1eb72a9 --- /dev/null +++ b/dot_local/lib/sh/jump.fish @@ -0,0 +1,2 @@ +. hascmd jump || return +jump shell fish | source diff --git a/dot_local/lib/sh/luarocks b/dot_local/lib/sh/luarocks new file mode 100644 index 0000000..f7dcb84 --- /dev/null +++ b/dot_local/lib/sh/luarocks @@ -0,0 +1,3 @@ +. hascmd luarocks || return +export LUA_CPATH=$(luarocks path --lr-cpath) +export LUA_PATH=$(luarocks path --lr-path)";./?.lua" diff --git a/dot_local/lib/sh/luarocks.fish b/dot_local/lib/sh/luarocks.fish new file mode 100644 index 0000000..c6b92f5 --- /dev/null +++ b/dot_local/lib/sh/luarocks.fish @@ -0,0 +1,3 @@ +. hascmd luarocks || return +set -x LUA_CPATH (luarocks path --lr-cpath) +set -x LUA_PATH (luarocks path --lr-path)";./?.lua" diff --git a/dot_local/lib/sh/rg b/dot_local/lib/sh/rg new file mode 100644 index 0000000..77a05e3 --- /dev/null +++ b/dot_local/lib/sh/rg @@ -0,0 +1,2 @@ +. hascmd rg || return +[ -f ~/.config/ripgrep.conf ] && export RIPGREP_CONFIG_PATH=~/.config/ripgrep.conf diff --git a/dot_local/lib/sh/skim b/dot_local/lib/sh/skim new file mode 100644 index 0000000..bef7e11 --- /dev/null +++ b/dot_local/lib/sh/skim @@ -0,0 +1,2 @@ +. hascmd sk || return +export SKIM_DEFAULT_COMMAND="fd --type f || rg --files || find ." diff --git a/dot_local/lib/sh/ssh b/dot_local/lib/sh/ssh new file mode 100644 index 0000000..4f007b1 --- /dev/null +++ b/dot_local/lib/sh/ssh @@ -0,0 +1,2 @@ +. hascmd ssh || return +alias ossh='ssh -p StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o LogLevel=Error' diff --git a/dot_local/lib/sh/ugrep b/dot_local/lib/sh/ugrep new file mode 100644 index 0000000..1000a39 --- /dev/null +++ b/dot_local/lib/sh/ugrep @@ -0,0 +1,8 @@ +. hascmd ugrep || return +alias grep='ugrep -G -.' +alias xdump='ugrep -X ""' + +. hascmd ug || return +alias uq='ug -Q' +alias ux='ug -UX' +alias uz='ug -z' diff --git a/dot_local/lib/sh/xh b/dot_local/lib/sh/xh new file mode 100644 index 0000000..a69fbcb --- /dev/null +++ b/dot_local/lib/sh/xh @@ -0,0 +1,3 @@ +. hascmd xh || return +alias xh='xh -F' +alias x='xh -b' |
