Update 2024-12-22 09:05 OpenBSD/amd64-t14
This commit is contained in:
parent
d49eb5d52f
commit
4ec4facf23
@ -1,6 +1,6 @@
|
|||||||
#!/bin/ksh
|
#!/bin/ksh
|
||||||
|
|
||||||
FILE="$HOME/.ksh.complete"
|
FILE="$HOME/.kshrc.autocomplete"
|
||||||
|
|
||||||
rm -f "${FILE}"
|
rm -f "${FILE}"
|
||||||
|
|
||||||
@ -37,6 +37,17 @@ add "set -A complete_kill_1 -- " "-9 -HUP -INFO -KILL -TERM"
|
|||||||
#
|
#
|
||||||
add "set -A complete_ifconfig_1 -- " "$(ifconfig | grep ^[a-z] | cut -d: -f1)"
|
add "set -A complete_ifconfig_1 -- " "$(ifconfig | grep ^[a-z] | cut -d: -f1)"
|
||||||
|
|
||||||
|
#
|
||||||
|
# manpages
|
||||||
|
#
|
||||||
|
S1="$(man -s 1 -k any= | cut -d"(" -f1 | tr -d "," | xargs)"
|
||||||
|
S2="$(man -s 2 -k any= | cut -d"(" -f1 | tr -d "," | xargs)"
|
||||||
|
S3="$(man -s 3 -k any= | cut -d"(" -f1 | tr -d "," | xargs)"
|
||||||
|
S4="$(man -s 4 -k any= | cut -d"(" -f1 | tr -d "," | xargs)"
|
||||||
|
S5="$(man -s 5 -k any= | cut -d"(" -f1 | tr -d "," | xargs)"
|
||||||
|
S8="$(man -s 8 -k any= | cut -d"(" -f1 | tr -d "," | xargs)"
|
||||||
|
add "set -A complete_man_1 -- " "$S1 $S5 $S8"
|
||||||
|
|
||||||
#
|
#
|
||||||
# AMUSED
|
# AMUSED
|
||||||
#
|
#
|
37
.bin/upload
37
.bin/upload
@ -1,25 +1,24 @@
|
|||||||
#!/bin/sh -e
|
#!/bin/sh -e
|
||||||
|
|
||||||
file="$1"
|
if [ x"$1" == x"rm" ]
|
||||||
|
then
|
||||||
[ -z $file ] \
|
shift
|
||||||
&& file="$(find $PWD $HOME $HOME/Downloads -maxdepth 2 -type f \
|
for file in $@
|
||||||
| fgrep -v "/." \
|
do
|
||||||
| sort -u \
|
ssh sdk@codevoid.de "cd /home/www/htdocs/ptrace/paste/ && rm -v $(basename "$file")" || true
|
||||||
| fzf -e -x -i)"
|
done
|
||||||
|
elif [ x"$1" == x"ls" ]
|
||||||
[ -z $file ] \
|
then
|
||||||
&& exit 0
|
shift
|
||||||
|
ssh sdk@codevoid.de "cd /home/www/htdocs/ptrace/paste/ && ls -1 | xargs -n1 -I{} echo https://ptrace.org/{}"
|
||||||
scp "$file" \
|
else
|
||||||
sdk@home.codevoid.de:make-web/src/paste/
|
for file in $@
|
||||||
|
do
|
||||||
ssh sdk@home.codevoid.de \
|
chmod o+rw,g+r "$file"
|
||||||
"cd ~/make-web && make install"
|
scp "$file" sdk@codevoid.de:/home/www/htdocs/ptrace/paste/
|
||||||
|
|
||||||
echo "https://ptrace.org/$(basename "$file")" \
|
echo "https://ptrace.org/$(basename "$file")" \
|
||||||
| sed 's/ /%20/g' \
|
| sed 's/ /%20/g' \
|
||||||
| xclip -f -r
|
| xclip -f -r
|
||||||
|
|
||||||
echo
|
echo
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
2
.kshrc
2
.kshrc
@ -107,7 +107,7 @@ set bell-style none
|
|||||||
# LOAD COMPLETION FILE
|
# LOAD COMPLETION FILE
|
||||||
########################################################################
|
########################################################################
|
||||||
|
|
||||||
[ -f ~/.ksh.complete ] && . ~/.ksh.complete
|
[ -f ~/.kshrc.autocomplete ] && . ~/.kshrc.autocomplete
|
||||||
|
|
||||||
########################################################################
|
########################################################################
|
||||||
# PROMPT
|
# PROMPT
|
||||||
|
15
.kshrc.autocomplete
Normal file
15
.kshrc.autocomplete
Normal file
File diff suppressed because one or more lines are too long
@ -212,7 +212,7 @@ alternative_order text/plain text/enriched text/html
|
|||||||
auto_view text/html text/enriched text/calendar
|
auto_view text/html text/enriched text/calendar
|
||||||
|
|
||||||
# Preview HTML
|
# Preview HTML
|
||||||
macro pager,attach \cs "<pipe-message>cat > /tmp/muttpatch.diff<enter><shell-escape>~/.mutt/scripts/portpatch2.sh /tmp/muttpatch.diff<enter>"
|
macro pager,attach \cs "<pipe-message>cat > /tmp/muttpatch.diff<enter><shell-escape>~/.mutt/scripts/apply_patch.sh /tmp/muttpatch.diff<enter>"
|
||||||
|
|
||||||
# Save Patch
|
# Save Patch
|
||||||
#macro pager \cs "<shell-escape>rm -f /tmp/mutt-patch.diff<enter><copy-message>/tmp/mutt-patch.diff<enter><enter-command>echo 'Saved as /tmp/mutt-patch.diff'<enter><shell-escape>~/.mutt/scripts/portpatch.sh /tmp/mutt-patch.diff<enter>"
|
#macro pager \cs "<shell-escape>rm -f /tmp/mutt-patch.diff<enter><copy-message>/tmp/mutt-patch.diff<enter><enter-command>echo 'Saved as /tmp/mutt-patch.diff'<enter><shell-escape>~/.mutt/scripts/portpatch.sh /tmp/mutt-patch.diff<enter>"
|
||||||
|
35
.mutt/scripts/apply_patch.sh
Executable file
35
.mutt/scripts/apply_patch.sh
Executable file
@ -0,0 +1,35 @@
|
|||||||
|
#!/bin/ksh -e
|
||||||
|
|
||||||
|
# needs converters/qprint
|
||||||
|
# mutt: macro pager,attach \cs "<pipe-message>cat > /tmp/muttpatch.diff<enter><shell-escape>~/.mutt/scripts/apply_patch.sh /tmp/muttpatch.diff<enter>"
|
||||||
|
|
||||||
|
clear
|
||||||
|
|
||||||
|
printf '\n---------------------------------------------------------------------\n'
|
||||||
|
grep -E 'Subject: |^Index|^RCS|^diff --git|^file +|^[-+]{3} ' "${1}"
|
||||||
|
printf '---------------------------------------------------------------------\n\n'
|
||||||
|
|
||||||
|
printf "Base path for the patch?\n"
|
||||||
|
printf "Example: /usr/ports or /usr/src\n"
|
||||||
|
printf ": "
|
||||||
|
read -r _path
|
||||||
|
cd $_path
|
||||||
|
|
||||||
|
print "Using: $_path"
|
||||||
|
|
||||||
|
printf "Fix quoted-printable mangeled patch? [y/N]: "
|
||||||
|
read -r _qprint
|
||||||
|
|
||||||
|
case ${_qprint} in
|
||||||
|
[y|Y]) _catcmd="qprint -d"; ;;
|
||||||
|
*) _catcmd="cat"; ;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
printf "Strip? [0]: "
|
||||||
|
read -r _strip
|
||||||
|
|
||||||
|
echo "CMD: ${_catcmd} "${1}" | doas -u sdk patch -E -pp${_strip:=0} -d ${_path}"
|
||||||
|
${_catcmd} "${1}" | doas -u sdk patch -E -N -p${_strip:=0} -d ${_path}
|
||||||
|
echo ${_path} | xclip
|
||||||
|
echo "done."
|
||||||
|
read
|
@ -73,6 +73,7 @@ set wildmode=full
|
|||||||
|
|
||||||
""map :q map <leader>q :bp<bar>sp<bar>bn<bar>bd<CR>
|
""map :q map <leader>q :bp<bar>sp<bar>bn<bar>bd<CR>
|
||||||
nmap Q :qall!
|
nmap Q :qall!
|
||||||
|
nmap k :HugoHelperLink
|
||||||
|
|
||||||
let g:currentmode={
|
let g:currentmode={
|
||||||
\ 'n' : 'NORMAL',
|
\ 'n' : 'NORMAL',
|
||||||
@ -347,3 +348,4 @@ augroup END
|
|||||||
augroup diffsyntax
|
augroup diffsyntax
|
||||||
autocmd! OptionSet diff syntax off
|
autocmd! OptionSet diff syntax off
|
||||||
augroup END
|
augroup END
|
||||||
|
autocmd FocusLost <buffer> silent write
|
||||||
|
Loading…
Reference in New Issue
Block a user