bin: dash resistance

This commit is contained in:
xeruf 2023-09-18 17:41:53 +02:00
parent 747b50f2e3
commit 905b43b5d4
7 changed files with 15 additions and 13 deletions

View File

@ -193,3 +193,5 @@
path = "~/.config/yadm/gitconfig"
[safe]
directory = /opt/flutter
[credential]
helper = cache --timeout 1000

View File

@ -49,7 +49,7 @@ cd() {
# TODO test whether still needed with exa
command ls --sort=none --quote-name |
head -12 |
COLUMNS=$(tput cols) xargs $(which exa >/dev/null 2>&1 && echo "exa --list-dirs --icons --reverse" || echo 'ls --format=vertical --literal --classify --directory') --sort=time --color=always |
COLUMNS=$(tput cols) xargs $(which exa >/dev/null 2>&1 && echo "exa --list-dirs --icons --reverse" || echo 'ls --format=vertical --literal --classify --directory') --sort=time --color=always -- |
head -3
code=$? && test $code -eq 141 || return $code
fi

View File

@ -190,6 +190,7 @@ source_existing() {
}
source_existing $CONFIG_ZSH/.p10k.zsh # To customize prompt, run `p10k configure` or edit .p10k.zsh.
source_existing $CONFIG_ZSH/sgpt.zsh
source_existing /usr/share/fzf/key-bindings.zsh /usr/share/fzf/completion.zsh
source_existing "$NVM_DIR/nvm.sh"

7
.local/bin/scripts/boost Executable file
View File

@ -0,0 +1,7 @@
#!/bin/sh -e
# Install syncthingtray and other things using boost, preventing conflicts
# Pass -git as argument to install the git version with dependencies
pacman -Qq | grep -E '^(syncthingtray)' | xargs --no-run-if-empty yay -R --noconfirm
suffix=$1
yay --noconfirm -Syy --nobatchinstall --answerdiff none boost c++utilities$suffix qtforkawesome$suffix qtutilities$suffix
yay --noconfirm -S syncthingtray$suffix guitarix

View File

@ -1,8 +1,9 @@
#!/bin/sh -e
# open info-page, man-page or command help
# open info-page, man-page or command with help flag
# depends: unbuffer
# optdepends: highlight(dotfiles)
# TODO show tldr page
# TODO extract help in standard format from scripts
paginate="${PAGER:-less} +Gg"
case "$1" in
(-d) browse=1; shift;;
@ -25,13 +26,11 @@ showinfo() {
cmd="$1"
case "$cmd" in
# TODO extract help in standard format from scripts
(fwupdmgr|hunt|rdoc|gh|chordpro|bat|pdfjam|reflector|topgrade|r128gain|7z|kubectl|diffr|docker|jrnl|difft|wiked-diff|qpdf|ninja) unbuffer "$@" --help | sed 's|^[^ ].*:|\0|' | $paginate;;
(caddy|stretchly|go|flutter)
shift
"$cmd" help "$@" | $paginate;;
# Non-standard help flags
(doom) "$@" --help;; # Doom paginates itself
(doom|sgpt) "$@" --help;; # Paginates itself
(mpw) "$@" -h 2>&1 | $paginate;;
(spectre|plantuml|java) unbuffer "$@" -help | $paginate;;
(rails) { "$@" -H && "$@" --help; } | $paginate;;

View File

@ -1,7 +0,0 @@
#!/bin/sh -e
# Install syncthingtray, preventing conflicts
# Pass -git as argument to install the git version with dependencies
pacman -Qq | grep '^syncthingtray' | xargs -r yay --noconfirm -R
suffix=$1
yay --noconfirm -Syy --nobatchinstall boost c++utilities$suffix qtforkawesome$suffix qtutilities$suffix
yay --noconfirm -S syncthingtray$suffix

View File

@ -2,6 +2,6 @@
# xdg-open all given files
# TODO handle .desktop-files with gtk-launch/dex/kioclient exec, add selector from xdg-mime-file
while test $# -gt 0; do
xdg-open "$1"
xdg-open "$(case "$1" in (-*) echo './';; esac)$1"
shift
done