2 jan 2023

This commit is contained in:
Pierre-Edouard Portier 2023-01-02 22:43:00 +01:00
parent a4e8347219
commit 7ed9b9a93a
4 changed files with 51 additions and 1 deletions

3
bin/a
View File

@ -24,4 +24,5 @@ fi
# In `win`, Node.js REPL looks nicer without ANSI codes
export NODE_NO_READLINE=1
acme -a -f /mnt/font/AndaleMono/13a/font $1
# /mnt/font/AndaleMono/13a/font
acme -a -f /mnt/font/InputMonoNarrow-Regular/13a/font $1

28
bin/abig Executable file
View File

@ -0,0 +1,28 @@
#!/usr/bin/env bash
export SHELL="/bin/bash"
export acmeshell="/bin/bash"
export BROWSER=safari
export tabstop=4
export TERM=dumb
export PAGER=nobs
# Path to 'a' script itself
acme_bin_dir=$( cd $(dirname $0) && pwd )
# Where are the plumber rules?
acme_plumber_rules="$acme_bin_dir/../plumbing"
if [ "$(pgrep plumber)" ]; then
echo plumber is running
else
echo starting plumber
plumber
cat "$acme_plumber_rules" "$PLAN9/plumb/basic" | 9p write plumb/rules
fi
# In `win`, Node.js REPL looks nicer without ANSI codes
export NODE_NO_READLINE=1
# /mnt/font/AndaleMono/13a/font
acme -a -f /mnt/font/InputMonoNarrow-Regular/20a/font $1

3
bin/gg Executable file
View File

@ -0,0 +1,3 @@
#!/usr/bin/env bash
git grep -n "$@"

View File

@ -0,0 +1,18 @@
# urls go to web browser
type is text
data matches '(https?|ftp|file|gopher|mailto|news|nntp|telnet|wais|prospero)://[a-zA-Z0-9_@\-]+([.:][a-zA-Z0-9_@\-]+)*/?[a-zA-Z0-9_?,%#~&/\-+=]+([:.][a-zA-Z0-9_?,%#~&/\-+=]+)*'
plumb start open $0
# image files go to osx default
type is text
data matches '[a-zA-Z¡-￿0-9_\-./]+'
data matches '([a-zA-Z¡-￿0-9_\-./]+)\.(jpe?g|JPE?G|gif|GIF|tiff?|TIFF?|ppm|bit|png|PNG)'
arg isfile $0
plumb start open $file
# postscript/pdf/dvi go to osx default
type is text
data matches '[a-zA-Z¡-￿0-9_\-./]+'
data matches '([a-zA-Z¡-￿0-9_\-./]+)\.(ps|PS|eps|EPS|pdf|PDF|dvi|DVI)'
arg isfile $0
plumb start open $0