bin: add help & tracefile, auto-resolve intention conflicts
This commit is contained in:
parent
986dc4ff1c
commit
55603814e4
|
@ -11,6 +11,7 @@ test -e "$last" || exit 1
|
||||||
case "$(file --dereference --mime "$last")" in
|
case "$(file --dereference --mime "$last")" in
|
||||||
*inode/directory*) ls -l --color=always --human-readable --group-directories-first --file-type --dereference-command-line --almost-all "$@";;
|
*inode/directory*) ls -l --color=always --human-readable --group-directories-first --file-type --dereference-command-line --almost-all "$@";;
|
||||||
*binary) ;;
|
*binary) ;;
|
||||||
*) $(test -f "$last" -a ! -r "$last" && echo "sudo") bat --style header "$@"
|
*) $(test -f "$last" -a ! -r "$last" && echo "sudo") bat --style header --pager "less --LONG-PROMPT --quit-if-one-screen" "$@"
|
||||||
stat --format '%A size %sB, birth: %.10w mod %.10y' "$last";;
|
tput setaf 3 && stat --format '%A size %sB, birth: %.10w mod %.10y' "$last"
|
||||||
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
|
@ -0,0 +1,8 @@
|
||||||
|
#!/bin/sh
|
||||||
|
case $1 in
|
||||||
|
(vlc) unbuffer vlc --full-help "${@:2}" | ${PAGER:-less} --quit-if-one-screen;;
|
||||||
|
(zmv) # https://unix.stackexchange.com/questions/19290/zmv-for-zsh-dry-runs-and-man-pages
|
||||||
|
# need to install zsh-doc for info
|
||||||
|
info --index-search=zmv zsh || LESS="$LESS +/^ *zmv *\\[" man zshcontrib;;
|
||||||
|
(*) man "$@" || "$@" --help | ${PAGER:-less} --quit-if-one-screen;;
|
||||||
|
esac
|
|
@ -20,5 +20,7 @@ if test "$#" -gt 0
|
||||||
(m) touch /tmp/empty && git merge-file "$orig" /tmp/empty "$1" && nvim "$orig" && rm "$1";;
|
(m) touch /tmp/empty && git merge-file "$orig" /tmp/empty "$1" && nvim "$orig" && rm "$1";;
|
||||||
esac
|
esac
|
||||||
fi
|
fi
|
||||||
else find -name '*sync-conflict*' -exec st-diff $quick '{}' \;
|
else
|
||||||
|
find "$DATA/2-standards/notes/journal" -name "intentions.sync-conflict*" -exec jrnl intentions --import --file {} \; -delete
|
||||||
|
find -name '*sync-conflict*' -exec st-diff $quick '{}' \;
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -0,0 +1,2 @@
|
||||||
|
#!/bin/sh
|
||||||
|
strace --follow-forks -e trace=file "$@" 2>&1 >/dev/null | grep openat | cut -d'"' -f2 | grep -v ".so" | grep -v "/dev/" | less
|
Loading…
Reference in New Issue