diff options
| author | 2024-03-08 22:38:15 +0100 | |
|---|---|---|
| committer | 2024-03-08 22:38:15 +0100 | |
| commit | cc74c7adb0a5fc4a3b90d3ea43424123f0acde44 (patch) | |
| tree | 01c5f4be74233b585da451a580fee237d1aba21c | |
| parent | git: difftastic is optional, add local.config (diff) | |
sh: move from ~/.local/lib/sh to ~/.local/share/sh
It's debatable but ultimately it *is* arch-independent and ro.
Diffstat (limited to '')
29 files changed, 106 insertions, 0 deletions
diff --git a/dot_local/share/sh/bat b/dot_local/share/sh/bat new file mode 100644 index 0000000..6ac64f8 --- /dev/null +++ b/dot_local/share/sh/bat @@ -0,0 +1,3 @@ +. hascmd bat || return +alias cat=bat +alias c='bat -pp' diff --git a/dot_local/share/sh/bsdtar b/dot_local/share/sh/bsdtar new file mode 100644 index 0000000..a5ca6e5 --- /dev/null +++ b/dot_local/share/sh/bsdtar @@ -0,0 +1,2 @@ +. hascmd bsdtar || return +alias tar=bsdtar diff --git a/dot_local/share/sh/chafa b/dot_local/share/sh/chafa new file mode 100644 index 0000000..9df5097 --- /dev/null +++ b/dot_local/share/sh/chafa @@ -0,0 +1,3 @@ +. hascmd chafa || return + +alias chafa='chafa -f sixel' diff --git a/dot_local/share/sh/cling b/dot_local/share/sh/cling new file mode 100644 index 0000000..bb3063c --- /dev/null +++ b/dot_local/share/sh/cling @@ -0,0 +1,3 @@ +. hascmd cling || return +alias cci="cling $CLING_ARGS --nologo -xc" +alias cxxi="cling $CLING_ARGS --nologo -xc++" diff --git a/dot_local/share/sh/colordiff b/dot_local/share/sh/colordiff new file mode 100644 index 0000000..d14132f --- /dev/null +++ b/dot_local/share/sh/colordiff @@ -0,0 +1,3 @@ +. hascmd colordiff || return +alias diff=colordiff +alias dif='colordiff -u' diff --git a/dot_local/share/sh/date b/dot_local/share/sh/date new file mode 100644 index 0000000..2c9e297 --- /dev/null +++ b/dot_local/share/sh/date @@ -0,0 +1,2 @@ +. hascmd date || return +alias weekdate="date '+%W %a'" diff --git a/dot_local/share/sh/docker b/dot_local/share/sh/docker new file mode 100644 index 0000000..a7ccf0a --- /dev/null +++ b/dot_local/share/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/share/sh/docker.fish b/dot_local/share/sh/docker.fish new file mode 100644 index 0000000..e04437b --- /dev/null +++ b/dot_local/share/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/share/sh/exa b/dot_local/share/sh/exa new file mode 100644 index 0000000..ed3c55d --- /dev/null +++ b/dot_local/share/sh/exa @@ -0,0 +1,8 @@ +. hascmd exa || return +alias ls=exa +alias l='exa -l' +alias ll='exa -l' +alias la='exa -a' +alias lla='exa -la' + +alias tree='exa -T' diff --git a/dot_local/share/sh/eza b/dot_local/share/sh/eza new file mode 100644 index 0000000..f573e10 --- /dev/null +++ b/dot_local/share/sh/eza @@ -0,0 +1,8 @@ +. hascmd eza || return +alias ls=eza +alias l='eza -l' +alias ll='eza -l' +alias la='eza -a' +alias lla='eza -la' + +alias tree='eza -T' diff --git a/dot_local/share/sh/ffmpeg b/dot_local/share/sh/ffmpeg new file mode 100644 index 0000000..4807cda --- /dev/null +++ b/dot_local/share/sh/ffmpeg @@ -0,0 +1,3 @@ +. hascmd ffmpeg || return +alias ffmpeg='ffmpeg -hide_banner' +alias ffprobe='ffprobe -hide_banner' diff --git a/dot_local/share/sh/hascmd b/dot_local/share/sh/hascmd new file mode 100644 index 0000000..994bc71 --- /dev/null +++ b/dot_local/share/sh/hascmd @@ -0,0 +1 @@ +test -x "$(command -v $1)" diff --git a/dot_local/share/sh/hascmd.fish b/dot_local/share/sh/hascmd.fish new file mode 100644 index 0000000..9d566c8 --- /dev/null +++ b/dot_local/share/sh/hascmd.fish @@ -0,0 +1 @@ +type -qf $argv diff --git a/dot_local/share/sh/iproute2 b/dot_local/share/sh/iproute2 new file mode 100644 index 0000000..18a0dd0 --- /dev/null +++ b/dot_local/share/sh/iproute2 @@ -0,0 +1,2 @@ +. hascmd ip || return +alias ip='ip -c=auto' diff --git a/dot_local/share/sh/jaq b/dot_local/share/sh/jaq new file mode 100644 index 0000000..851c291 --- /dev/null +++ b/dot_local/share/sh/jaq @@ -0,0 +1,2 @@ +. hascmd jaq || return +alias jq=jaq diff --git a/dot_local/share/sh/jump b/dot_local/share/sh/jump new file mode 100644 index 0000000..8df5747 --- /dev/null +++ b/dot_local/share/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/share/sh/jump.fish b/dot_local/share/sh/jump.fish new file mode 100644 index 0000000..1eb72a9 --- /dev/null +++ b/dot_local/share/sh/jump.fish @@ -0,0 +1,2 @@ +. hascmd jump || return +jump shell fish | source diff --git a/dot_local/share/sh/lsd b/dot_local/share/sh/lsd new file mode 100644 index 0000000..e2a4bd5 --- /dev/null +++ b/dot_local/share/sh/lsd @@ -0,0 +1,9 @@ +. hascmd lsd || return +alias ls=lsd +alias l='lsd -l' +alias ll='lsd -l' +alias la='lsd -a' +alias lla='lsd -la' + +alias lh='lsd --hyperlink=auto' +alias tree='lsd --tree --hyperlink=auto' diff --git a/dot_local/share/sh/luarocks b/dot_local/share/sh/luarocks new file mode 100644 index 0000000..f7dcb84 --- /dev/null +++ b/dot_local/share/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/share/sh/luarocks.fish b/dot_local/share/sh/luarocks.fish new file mode 100644 index 0000000..c6b92f5 --- /dev/null +++ b/dot_local/share/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/share/sh/rg b/dot_local/share/sh/rg new file mode 100644 index 0000000..77a05e3 --- /dev/null +++ b/dot_local/share/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/share/sh/rg.fish b/dot_local/share/sh/rg.fish new file mode 100644 index 0000000..6450fa2 --- /dev/null +++ b/dot_local/share/sh/rg.fish @@ -0,0 +1,2 @@ +. hascmd rg || return +test -f ~/.config/ripgrep.conf && set -gx RIPGREP_CONFIG_PATH ~/.config/ripgrep.conf diff --git a/dot_local/share/sh/skim b/dot_local/share/sh/skim new file mode 100644 index 0000000..bef7e11 --- /dev/null +++ b/dot_local/share/sh/skim @@ -0,0 +1,2 @@ +. hascmd sk || return +export SKIM_DEFAULT_COMMAND="fd --type f || rg --files || find ." diff --git a/dot_local/share/sh/ssh b/dot_local/share/sh/ssh new file mode 100644 index 0000000..9b25647 --- /dev/null +++ b/dot_local/share/sh/ssh @@ -0,0 +1,2 @@ +. hascmd ssh || return +alias ossh='ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o LogLevel=Error' diff --git a/dot_local/share/sh/ugrep b/dot_local/share/sh/ugrep new file mode 100644 index 0000000..28bd159 --- /dev/null +++ b/dot_local/share/sh/ugrep @@ -0,0 +1,9 @@ +. 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' +alias g='ug -G -.' diff --git a/dot_local/share/sh/xh b/dot_local/share/sh/xh new file mode 100644 index 0000000..1c1bfd0 --- /dev/null +++ b/dot_local/share/sh/xh @@ -0,0 +1,2 @@ +. hascmd xh || return +alias x='xh -b' diff --git a/dot_local/share/sh/zoxide b/dot_local/share/sh/zoxide new file mode 100644 index 0000000..210db16 --- /dev/null +++ b/dot_local/share/sh/zoxide @@ -0,0 +1,2 @@ +. hascmd zoxide || return +eval "$(zoxide init posix --hook prompt)" diff --git a/dot_local/share/sh/zoxide.bash b/dot_local/share/sh/zoxide.bash new file mode 100644 index 0000000..6a02524 --- /dev/null +++ b/dot_local/share/sh/zoxide.bash @@ -0,0 +1,2 @@ +. hascmd zoxide || return +eval "$(zoxide init bash)" diff --git a/dot_local/share/sh/zoxide.fish b/dot_local/share/sh/zoxide.fish new file mode 100644 index 0000000..b62450c --- /dev/null +++ b/dot_local/share/sh/zoxide.fish @@ -0,0 +1,2 @@ +. hascmd zoxide || return +zoxide init fish | source |
