Update 2024-12-26 17:21 OpenBSD/amd64-t14

This commit is contained in:
c0dev0id 2024-12-26 17:21:55 +01:00
parent 3768436e21
commit 7c5d1f298f
4 changed files with 20 additions and 27 deletions

8
.bin/g
View File

@ -47,18 +47,20 @@ _branch=$(git --no-pager branch \
2> /dev/null) 2> /dev/null)
[ -n "$_base" ] \ [ -n "$_base" ] \
&& echo "# branch ($_branch) fork point: $_base" \ && printf '%s\n' "# branch ($_branch) fork point: $_base" \
| sed "s/\(.\{$_width\}\).*/\1.../" | sed "s/\(.\{$_width\}\).*/\1.../"
_log=$(git --no-pager log \ _log=$(git --no-pager log \
--reverse \
--abbrev-commit \ --abbrev-commit \
--pretty=format:'%h | %an: %s' \ --date=format:'%d.%m.%y %H:%S' \
--pretty=format:'%h|%ad|%an: %s' \
...origin/HEAD \ ...origin/HEAD \
2>/dev/null) 2>/dev/null)
if [ -n "$_log" ] if [ -n "$_log" ]
then then
echo "# local commits" echo "# local commits"
echo "$_log" | sed "s/\(.\{$_width\}\).*/\1.../" printf '%s\n' "$_log" | sed "s/\(.\{$_width\}\).*/\1.../"
else else
echo "# no local commits" echo "# no local commits"
fi fi

View File

@ -133,27 +133,6 @@ then
vimdiff "$_dir/$f" "${_dir%$_env}$2/$f" vimdiff "$_dir/$f" "${_dir%$_env}$2/$f"
fi fi
if [ "$_action" == "diffdir" ]
then
if test -z "$1" || test -z "$2"
then
echo "args: <commits> <env>"
exit 1
fi
flist="$(git --no-pager whatchanged \
--oneline \
--pretty=format:'' ...HEAD~$1 \
| cut -d"M" -f2- \
| sort -u \
| xargs)"
for file in $flist
do
f="$(readlink -f $_oldpwd/$file)"
f="${file#$_dir}"
vimdiff "$_dir/$f" "${_dir%$_env}$2/$f"
done
fi
if [ "$_action" == "pr" ] if [ "$_action" == "pr" ]
then then
if [ -n "$1" ] if [ -n "$1" ]

14
.kshrc
View File

@ -200,6 +200,20 @@ alias mygit-unstage="git restore --staged"
alias mygit-untrack="git rm --cached" alias mygit-untrack="git rm --cached"
alias mygit-track="git add --intent-to-add" alias mygit-track="git add --intent-to-add"
alias mygit-update="git fetch --all" alias mygit-update="git fetch --all"
alias mygit-diff="git difftool -y ..origin/HEAD"
alias mygit-log="git log --graph"
alias mygit-branch="git --no-pager branch --all"
alias mygit-delete-branch="git branch -D"
mygit-checkout() {
_local="$(echo "$1" | sed 's,remotes/,,g;s,origin/,,g;')"
git checkout -b $_local $1
}
alias mygit-changed-files="git --no-pager whatchanged origin/HEAD..HEAD | grep -E '^:' | awk '{ print \$6; }'"
mygit-diffbranch() {
for file in $(mygit-changed-files)
do
done
}
mygot-clone() { mygot-clone() {
if test -z "$1" || test -z "$2" if test -z "$1" || test -z "$2"

View File

@ -72,9 +72,7 @@ set fillchars+=foldopen:\🗁
set wildmode=full set wildmode=full
""map :q map <leader>q :bp<bar>sp<bar>bn<bar>bd<CR> nmap Q :qall!<cr>
nmap Q :qall!
nmap k :HugoHelperLink
let g:currentmode={ let g:currentmode={
\ 'n' : 'NORMAL', \ 'n' : 'NORMAL',