Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 8c75f4f7b3 | |||
| 8af0f0e543 | |||
| fb7101a65b | |||
| b96424cf79 |
5 changed files with 26 additions and 5 deletions
|
|
@ -4,6 +4,8 @@ export USAGE='<branch>
|
||||||
or: <remote> <branch>
|
or: <remote> <branch>
|
||||||
'
|
'
|
||||||
|
|
||||||
|
cd "$(git rev-parse --show-toplevel)"
|
||||||
|
|
||||||
# This is the recommended pattern from `man git-sh-setup`.
|
# This is the recommended pattern from `man git-sh-setup`.
|
||||||
#
|
#
|
||||||
# shellcheck disable=SC1090
|
# shellcheck disable=SC1090
|
||||||
|
|
@ -23,7 +25,6 @@ case "$#" in
|
||||||
*) usage ;;
|
*) usage ;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
|
||||||
# I often change the fetch refmap to only watch my development branches and
|
# I often change the fetch refmap to only watch my development branches and
|
||||||
# permanent shared ones. Explicitly use a default-ish refmap to undo that and
|
# permanent shared ones. Explicitly use a default-ish refmap to undo that and
|
||||||
# make this create a named local branch.
|
# make this create a named local branch.
|
||||||
|
|
|
||||||
18
bin/watch-run
Executable file
18
bin/watch-run
Executable file
|
|
@ -0,0 +1,18 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
set -euo pipefail
|
||||||
|
|
||||||
|
if [ "$#" -lt 2 ]; then
|
||||||
|
>&2 echo "usage: $0 dir command [args]"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
dir="$1"; shift
|
||||||
|
cmd=("$@")
|
||||||
|
|
||||||
|
# I specifically want the command to expand here.
|
||||||
|
#
|
||||||
|
# shellcheck disable=SC2068
|
||||||
|
until fd . "${dir}" | entr -dr ${cmd[@]}; do
|
||||||
|
echo 'Press Space or edit a file to re-run command'
|
||||||
|
done
|
||||||
|
|
@ -10,10 +10,9 @@ fi
|
||||||
dir="$1"; shift
|
dir="$1"; shift
|
||||||
cmd=("$@")
|
cmd=("$@")
|
||||||
|
|
||||||
echo 'Press Space or edit a file to run tests'
|
|
||||||
# I specifically want the command to expand here.
|
# I specifically want the command to expand here.
|
||||||
#
|
#
|
||||||
# shellcheck disable=SC2068
|
# shellcheck disable=SC2068
|
||||||
until fd . "${dir}" | entr -cdpr ${cmd[@]}; do
|
until fd . "${dir}" | entr -cdr ${cmd[@]}; do
|
||||||
echo 'Press Space or edit a file to re-run tests'
|
echo 'Press Space or edit a file to re-run tests'
|
||||||
done
|
done
|
||||||
|
|
|
||||||
|
|
@ -84,12 +84,12 @@ tabpad = "‒"
|
||||||
|
|
||||||
[keys.normal.space.y]
|
[keys.normal.space.y]
|
||||||
"y" = "yank"
|
"y" = "yank"
|
||||||
|
"Y" = "yank_to_clipboard"
|
||||||
"j" = "yank_joined"
|
"j" = "yank_joined"
|
||||||
|
"J" = "yank_joined_to_clipboard"
|
||||||
"d" = ":yank-diagnostic"
|
"d" = ":yank-diagnostic"
|
||||||
|
|
||||||
[keys.normal.space.Y]
|
[keys.normal.space.Y]
|
||||||
"Y" = "yank_to_clipboard"
|
|
||||||
"j" = "yank_joined_to_clipboard"
|
|
||||||
"p" = ":noop %sh{printf '%%s' '%{buffer_name}' | cbcopy}"
|
"p" = ":noop %sh{printf '%%s' '%{buffer_name}' | cbcopy}"
|
||||||
"d" = ":noop %sh{printf '%%s' $(dirname '%{buffer_name}') | cbcopy}"
|
"d" = ":noop %sh{printf '%%s' $(dirname '%{buffer_name}') | cbcopy}"
|
||||||
"b" = ":noop %sh{printf '%%s' $(basename '%{buffer_name}') | cbcopy}"
|
"b" = ":noop %sh{printf '%%s' $(basename '%{buffer_name}') | cbcopy}"
|
||||||
|
|
|
||||||
|
|
@ -9,6 +9,9 @@ alias g='git'
|
||||||
alias rg='rg -S'
|
alias rg='rg -S'
|
||||||
alias sg='ast-grep'
|
alias sg='ast-grep'
|
||||||
|
|
||||||
|
alias b='bundle'
|
||||||
|
alias bx='bundle exec'
|
||||||
|
|
||||||
alias timestamp='now'
|
alias timestamp='now'
|
||||||
|
|
||||||
# I have never actually meant to start Ghostscript, but I'm sure that I'll want
|
# I have never actually meant to start Ghostscript, but I'm sure that I'll want
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue