bin: dash resistance
This commit is contained in:
parent
747b50f2e3
commit
905b43b5d4
|
@ -193,3 +193,5 @@
|
||||||
path = "~/.config/yadm/gitconfig"
|
path = "~/.config/yadm/gitconfig"
|
||||||
[safe]
|
[safe]
|
||||||
directory = /opt/flutter
|
directory = /opt/flutter
|
||||||
|
[credential]
|
||||||
|
helper = cache --timeout 1000
|
||||||
|
|
|
@ -49,7 +49,7 @@ cd() {
|
||||||
# TODO test whether still needed with exa
|
# TODO test whether still needed with exa
|
||||||
command ls --sort=none --quote-name |
|
command ls --sort=none --quote-name |
|
||||||
head -12 |
|
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
|
head -3
|
||||||
code=$? && test $code -eq 141 || return $code
|
code=$? && test $code -eq 141 || return $code
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -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/.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 /usr/share/fzf/key-bindings.zsh /usr/share/fzf/completion.zsh
|
||||||
|
|
||||||
source_existing "$NVM_DIR/nvm.sh"
|
source_existing "$NVM_DIR/nvm.sh"
|
||||||
|
|
|
@ -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
|
|
@ -1,8 +1,9 @@
|
||||||
#!/bin/sh -e
|
#!/bin/sh -e
|
||||||
# open info-page, man-page or command help
|
# open info-page, man-page or command with help flag
|
||||||
# depends: unbuffer
|
# depends: unbuffer
|
||||||
# optdepends: highlight(dotfiles)
|
# optdepends: highlight(dotfiles)
|
||||||
# TODO show tldr page
|
# TODO show tldr page
|
||||||
|
# TODO extract help in standard format from scripts
|
||||||
paginate="${PAGER:-less} +Gg"
|
paginate="${PAGER:-less} +Gg"
|
||||||
case "$1" in
|
case "$1" in
|
||||||
(-d) browse=1; shift;;
|
(-d) browse=1; shift;;
|
||||||
|
@ -25,13 +26,11 @@ showinfo() {
|
||||||
|
|
||||||
cmd="$1"
|
cmd="$1"
|
||||||
case "$cmd" in
|
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|^[^ ].*:|[1m\0[22m|' | $paginate;;
|
(fwupdmgr|hunt|rdoc|gh|chordpro|bat|pdfjam|reflector|topgrade|r128gain|7z|kubectl|diffr|docker|jrnl|difft|wiked-diff|qpdf|ninja) unbuffer "$@" --help | sed 's|^[^ ].*:|[1m\0[22m|' | $paginate;;
|
||||||
(caddy|stretchly|go|flutter)
|
(caddy|stretchly|go|flutter)
|
||||||
shift
|
shift
|
||||||
"$cmd" help "$@" | $paginate;;
|
"$cmd" help "$@" | $paginate;;
|
||||||
# Non-standard help flags
|
(doom|sgpt) "$@" --help;; # Paginates itself
|
||||||
(doom) "$@" --help;; # Doom paginates itself
|
|
||||||
(mpw) "$@" -h 2>&1 | $paginate;;
|
(mpw) "$@" -h 2>&1 | $paginate;;
|
||||||
(spectre|plantuml|java) unbuffer "$@" -help | $paginate;;
|
(spectre|plantuml|java) unbuffer "$@" -help | $paginate;;
|
||||||
(rails) { "$@" -H && "$@" --help; } | $paginate;;
|
(rails) { "$@" -H && "$@" --help; } | $paginate;;
|
||||||
|
|
|
@ -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
|
|
|
@ -2,6 +2,6 @@
|
||||||
# xdg-open all given files
|
# xdg-open all given files
|
||||||
# TODO handle .desktop-files with gtk-launch/dex/kioclient exec, add selector from xdg-mime-file
|
# TODO handle .desktop-files with gtk-launch/dex/kioclient exec, add selector from xdg-mime-file
|
||||||
while test $# -gt 0; do
|
while test $# -gt 0; do
|
||||||
xdg-open "$1"
|
xdg-open "$(case "$1" in (-*) echo './';; esac)$1"
|
||||||
shift
|
shift
|
||||||
done
|
done
|
||||||
|
|
Loading…
Reference in New Issue