bin: extend usecases handled by some scripts
- git-fuzz can also handle deletions - kover takes a parameter
This commit is contained in:
parent
85716b085a
commit
4b1a2f91db
|
@ -183,7 +183,7 @@ if test "$ls" -o $# -le $(echo "$flags" | wc -w); then
|
|||
{
|
||||
timeout .6s sh -c "
|
||||
if which exa 2>/dev/null >&2
|
||||
then exa --color=always --long --group --classify --group-directories-first --all --all $flags $(printf "'%s' " "${ls[@]:-.}")
|
||||
then exa --color=always --long --group --classify --all --all --sort=changed --reverse $flags $(printf "'%s' " "${ls[@]:-.}")
|
||||
else $elevate ls -l $(test $# -gt ${#ls[@]} && echo '-d') --color=always --human-readable --si --group-directories-first --file-type --dereference-command-line-symlink-to-dir --all $flags $(printf "'%s' " "${ls[@]:-.}")
|
||||
fi
|
||||
" || $elevate ls $(test $# -gt ${#ls[@]} && echo "-d") --color=always --human-readable --si --dereference-command-line --all --sort=none $flags "${ls[@]:-.}"
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
#!/bin/sh -e
|
||||
# Create a commit or stage files via fzf selection
|
||||
# If the first arg is "add", files are staged rather than committed.
|
||||
# All remaining args are passed to git-commit
|
||||
# All remaining args are passed to the last git command (add or commit).
|
||||
# TODO fix broken prep-commit-msg hook when there is no unifying path
|
||||
# fix broken alt-enter not opening editor --bind='alt-enter:change-prompt(hi>)'
|
||||
# TODO fix broken alt-enter not opening editor --bind='alt-enter:change-prompt(hi>)'
|
||||
|
||||
fzfpipe() {
|
||||
# Take nul-separated input from git-status short/porcelain
|
||||
|
@ -22,9 +22,10 @@ case "$1" in
|
|||
(add) shift
|
||||
git status -z --porcelain --no-renames --untracked-files=all $wd |
|
||||
grep -zv '^\\w ' | fzfpipe |
|
||||
git -c advice.addEmptyPathspec=false add --verbose --pathspec-from-file=- "$@";;
|
||||
xargs -d '\n' -L 1 git -c advice.addEmptyPathspec=false add --verbose "$@";;
|
||||
(*) git status -z --porcelain --no-renames $wd |
|
||||
sed -z 's/^\\(\\w\\) / \\1/' | fzfpipe >"$prefix/files"
|
||||
git -c advice.addEmptyPathspec=false add --intent-to-add --pathspec-from-file="$prefix/files"
|
||||
cat "$prefix/files" | xargs -d '\n' ls -fd 2>/dev/null >"$prefix/files-existing" || true
|
||||
git -c advice.addEmptyPathspec=false add --intent-to-add --pathspec-from-file="$prefix/files-existing"
|
||||
git commit -v --only --pathspec-from-file="$prefix/files" "$@";;
|
||||
esac
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#!/bin/sh
|
||||
# Prints the latest Gradle and Kotlin versions
|
||||
highlight "Kotlin"
|
||||
curl https://repo1.maven.org/maven2/org/jetbrains/kotlin/kotlin-stdlib/maven-metadata.xml 2>/dev/null | grep 'version>' | grep -iv '\(m\|rc\)' | sed 's/.*>\(.*\)<.*/\1/' | tail -6
|
||||
curl https://repo1.maven.org/maven2/org/jetbrains/kotlin/kotlin-stdlib/maven-metadata.xml 2>/dev/null | grep 'version>' | grep -iv '\(m\|rc\)' | sed 's/.*>\(.*\)<.*/\1/' | tail -${1:-6}
|
||||
highlight "Gradle"
|
||||
curl https://services.gradle.org/distributions/ 2>/dev/null | grep 'name.*all.*sha' | grep -v rc | head -6 | cut -d- -f2
|
||||
curl https://services.gradle.org/distributions/ 2>/dev/null | grep 'name.*all.*sha' | grep -v rc | head -${1:-6} | cut -d- -f2
|
Loading…
Reference in New Issue