diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2017-04-07 12:38:45 +1200 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2017-04-07 12:38:45 +1200 |
commit | ee8f9287bf3416c06ee8b5179a672b400058d236 (patch) | |
tree | f3cbd71a92b36fe02933bdad679cd7099c6ca6ad | |
parent | Merge branch 'master' into port/bsd/freebsd (diff) | |
parent | Install shell types conditionally on $SHELL (diff) | |
download | dotfiles-ee8f9287bf3416c06ee8b5179a672b400058d236.tar.gz dotfiles-ee8f9287bf3416c06ee8b5179a672b400058d236.zip |
Merge branch 'master' into port/bsd/freebsd
-rw-r--r-- | .gitignore | 93 | ||||
-rw-r--r-- | ISSUES.markdown | 2 | ||||
-rw-r--r-- | Makefile | 181 | ||||
-rw-r--r-- | README.markdown | 25 | ||||
-rw-r--r-- | bash/bash_profile | 7 | ||||
-rw-r--r--[-rwxr-xr-x] | bin/ap.sh (renamed from bin/ap) | 1 | ||||
-rw-r--r--[-rwxr-xr-x] | bin/apf.sh (renamed from bin/apf) | 1 | ||||
-rw-r--r--[-rwxr-xr-x] | bin/ax.sh (renamed from bin/ax) | 1 | ||||
-rw-r--r--[-rwxr-xr-x] | bin/bcq.sh (renamed from bin/bcq) | 1 | ||||
-rw-r--r--[-rwxr-xr-x] | bin/bel.sh (renamed from bin/bel) | 1 | ||||
-rw-r--r--[-rwxr-xr-x] | bin/bl.sh (renamed from bin/bl) | 1 | ||||
-rw-r--r--[-rwxr-xr-x] | bin/bp.sh (renamed from bin/bp) | 1 | ||||
-rw-r--r--[-rwxr-xr-x] | bin/br.sh (renamed from bin/br) | 1 | ||||
-rw-r--r--[-rwxr-xr-x] | bin/ca.sh (renamed from bin/ca) | 1 | ||||
-rw-r--r--[-rwxr-xr-x] | bin/cf.sh (renamed from bin/cf) | 1 | ||||
-rw-r--r--[-rwxr-xr-x] | bin/cfr.sh (renamed from bin/cfr) | 1 | ||||
-rw-r--r--[-rwxr-xr-x] | bin/chc.sh (renamed from bin/chc) | 1 | ||||
-rw-r--r--[-rwxr-xr-x] | bin/chn.sh (renamed from bin/chn) | 1 | ||||
-rw-r--r--[-rwxr-xr-x] | bin/clog.sh (renamed from bin/clog) | 1 | ||||
-rw-r--r--[-rwxr-xr-x] | bin/clrd.sh (renamed from bin/clrd) | 1 | ||||
-rw-r--r--[-rwxr-xr-x] | bin/clwr.sh (renamed from bin/clwr) | 1 | ||||
-rw-r--r--[-rwxr-xr-x] | bin/d2u.sh (renamed from bin/d2u) | 1 | ||||
-rw-r--r--[-rwxr-xr-x] | bin/dmp.sh (renamed from bin/dmp) | 1 | ||||
-rw-r--r--[-rwxr-xr-x] | bin/dub.sh (renamed from bin/dub) | 1 | ||||
-rw-r--r--[-rwxr-xr-x] | bin/edda.sh (renamed from bin/edda) | 1 | ||||
-rw-r--r--[-rwxr-xr-x] | bin/eds.sh (renamed from bin/eds) | 1 | ||||
-rw-r--r--[-rwxr-xr-x] | bin/exm.sh (renamed from bin/exm) | 3 | ||||
-rw-r--r--[-rwxr-xr-x] | bin/fgscr.sh (renamed from bin/fgscr) | 1 | ||||
-rw-r--r--[-rwxr-xr-x] | bin/finc.sh (renamed from bin/finc) | 1 | ||||
-rw-r--r--[-rwxr-xr-x] | bin/fnl.sh (renamed from bin/fnl) | 1 | ||||
-rw-r--r--[-rwxr-xr-x] | bin/gms.sh (renamed from bin/gms) | 1 | ||||
-rw-r--r--[-rwxr-xr-x] | bin/grc.sh (renamed from bin/grc) | 1 | ||||
-rw-r--r--[-rwxr-xr-x] | bin/gscr.sh (renamed from bin/gscr) | 1 | ||||
-rw-r--r--[-rwxr-xr-x] | bin/hurl.sh (renamed from bin/hurl) | 1 | ||||
-rw-r--r--[-rwxr-xr-x] | bin/igex.sh (renamed from bin/igex) | 1 | ||||
-rw-r--r--[-rwxr-xr-x] | bin/isgr.sh (renamed from bin/isgr) | 1 | ||||
-rw-r--r--[-rwxr-xr-x] | bin/ix.sh (renamed from bin/ix) | 1 | ||||
-rw-r--r--[-rwxr-xr-x] | bin/jfc.sh (renamed from bin/jfc) | 1 | ||||
-rw-r--r--[-rwxr-xr-x] | bin/jfcd.sh (renamed from bin/jfcd) | 1 | ||||
-rw-r--r--[-rwxr-xr-x] | bin/loc.sh (renamed from bin/loc) | 1 | ||||
-rw-r--r--[-rwxr-xr-x] | bin/maybe.sh (renamed from bin/maybe) | 1 | ||||
-rw-r--r--[-rwxr-xr-x] | bin/mex.sh (renamed from bin/mex) | 1 | ||||
-rw-r--r--[-rwxr-xr-x] | bin/mkcp.sh (renamed from bin/mkcp) | 1 | ||||
-rw-r--r--[-rwxr-xr-x] | bin/mkmv.sh (renamed from bin/mkmv) | 1 | ||||
-rw-r--r--[-rwxr-xr-x] | bin/mktd.sh (renamed from bin/mktd) | 1 | ||||
-rw-r--r--[-rwxr-xr-x] | bin/motd.sh (renamed from bin/motd) | 1 | ||||
-rw-r--r--[-rwxr-xr-x] | bin/murl.sh (renamed from bin/murl) | 1 | ||||
-rw-r--r--[-rwxr-xr-x] | bin/osc.sh (renamed from bin/osc) | 1 | ||||
-rw-r--r--[-rwxr-xr-x] | bin/pa.sh (renamed from bin/pa) | 1 | ||||
-rw-r--r--[-rwxr-xr-x] | bin/paz.sh (renamed from bin/paz) | 1 | ||||
-rw-r--r--[-rwxr-xr-x] | bin/pit.sh (renamed from bin/pit) | 1 | ||||
-rw-r--r--[-rwxr-xr-x] | bin/plmu.sh (renamed from bin/plmu) | 1 | ||||
-rw-r--r--[-rwxr-xr-x] | bin/pp.sh (renamed from bin/pp) | 1 | ||||
-rw-r--r--[-rwxr-xr-x] | bin/pph.sh (renamed from bin/pph) | 1 | ||||
-rw-r--r--[-rwxr-xr-x] | bin/pwg.sh (renamed from bin/pwg) | 1 | ||||
-rw-r--r--[-rwxr-xr-x] | bin/rfcf.sh (renamed from bin/rfcf) | 1 | ||||
-rw-r--r--[-rwxr-xr-x] | bin/rfcr.sh (renamed from bin/rfcr) | 1 | ||||
-rw-r--r--[-rwxr-xr-x] | bin/rgl.sh (renamed from bin/rgl) | 1 | ||||
-rw-r--r--[-rwxr-xr-x] | bin/rnda.sh (renamed from bin/rnda) | 1 | ||||
-rw-r--r--[-rwxr-xr-x] | bin/rndf.sh (renamed from bin/rndf) | 1 | ||||
-rw-r--r--[-rwxr-xr-x] | bin/rndl.sh (renamed from bin/rndl) | 1 | ||||
-rw-r--r--[-rwxr-xr-x] | bin/rnds.sh (renamed from bin/rnds) | 1 | ||||
-rw-r--r--[-rwxr-xr-x] | bin/shb.sh (renamed from bin/shb) | 1 | ||||
-rw-r--r--[-rwxr-xr-x] | bin/slow.sh (renamed from bin/slow) | 1 | ||||
-rw-r--r--[-rwxr-xr-x] | bin/sls.sh (renamed from bin/sls) | 1 | ||||
-rw-r--r--[-rwxr-xr-x] | bin/sqs.sh (renamed from bin/sqs) | 1 | ||||
-rw-r--r--[-rwxr-xr-x] | bin/sra.sh (renamed from bin/sra) | 1 | ||||
-rw-r--r--[-rwxr-xr-x] | bin/sshi.sh (renamed from bin/sshi) | 1 | ||||
-rw-r--r--[-rwxr-xr-x] | bin/sta.sh (renamed from bin/sta) | 1 | ||||
-rw-r--r--[-rwxr-xr-x] | bin/stbl.sh (renamed from bin/stbl) | 1 | ||||
-rw-r--r--[-rwxr-xr-x] | bin/stex.sh (renamed from bin/stex) | 1 | ||||
-rw-r--r--[-rwxr-xr-x] | bin/stws.sh (renamed from bin/stws) | 1 | ||||
-rw-r--r--[-rwxr-xr-x] | bin/sue.sh (renamed from bin/sue) | 1 | ||||
-rw-r--r--[-rwxr-xr-x] | bin/supp.sh (renamed from bin/supp) | 1 | ||||
-rw-r--r--[-rwxr-xr-x] | bin/swr.sh (renamed from bin/swr) | 1 | ||||
-rw-r--r--[-rwxr-xr-x] | bin/td.sh (renamed from bin/td) | 1 | ||||
-rw-r--r--[-rwxr-xr-x] | bin/tl.sh (renamed from bin/tl) | 1 | ||||
-rw-r--r--[-rwxr-xr-x] | bin/tlcs.sh (renamed from bin/tlcs) | 1 | ||||
-rw-r--r--[-rwxr-xr-x] | bin/tm.sh (renamed from bin/tm) | 1 | ||||
-rw-r--r--[-rwxr-xr-x] | bin/try.sh (renamed from bin/try) | 1 | ||||
-rw-r--r--[-rwxr-xr-x] | bin/u2d.sh (renamed from bin/u2d) | 1 | ||||
-rw-r--r--[-rwxr-xr-x] | bin/umake.sh (renamed from bin/umake) | 1 | ||||
-rw-r--r--[-rwxr-xr-x] | bin/urlc.sh (renamed from bin/urlc) | 1 | ||||
-rw-r--r--[-rwxr-xr-x] | bin/urlh.sh (renamed from bin/urlh) | 1 | ||||
-rw-r--r--[-rwxr-xr-x] | bin/urlmt.sh (renamed from bin/urlmt) | 1 | ||||
-rw-r--r--[-rwxr-xr-x] | bin/vest.sh (renamed from bin/vest) | 1 | ||||
-rw-r--r--[-rwxr-xr-x] | bin/vex.sh (renamed from bin/vex) | 1 | ||||
-rw-r--r--[-rwxr-xr-x] | bin/wro.sh (renamed from bin/wro) | 1 | ||||
-rw-r--r--[-rwxr-xr-x] | bin/xgo.sh (renamed from bin/xgo) | 1 | ||||
-rw-r--r--[-rwxr-xr-x] | bin/xgoc.sh (renamed from bin/xgoc) | 1 | ||||
-rw-r--r--[-rwxr-xr-x] | bin/xrbg.sh (renamed from bin/xrbg) | 1 | ||||
-rw-r--r--[-rwxr-xr-x] | check/bash.sh (renamed from check/bash) | 1 | ||||
-rwxr-xr-x | check/bin | 14 | ||||
-rw-r--r-- | check/bin.sh | 4 | ||||
-rwxr-xr-x | check/games | 14 | ||||
-rw-r--r-- | check/games.sh | 4 | ||||
-rw-r--r--[-rwxr-xr-x] | check/ksh.sh (renamed from check/ksh) | 1 | ||||
-rw-r--r--[-rwxr-xr-x] | check/man.sh (renamed from check/man) | 1 | ||||
-rw-r--r--[-rwxr-xr-x] | check/sh.sh (renamed from check/sh) | 1 | ||||
-rwxr-xr-x | check/urxvt | 9 | ||||
-rw-r--r-- | check/urxvt.sh | 4 | ||||
-rw-r--r--[-rwxr-xr-x] | check/yash.sh (renamed from check/yash) | 1 | ||||
-rw-r--r--[-rwxr-xr-x] | check/zsh.sh (renamed from check/zsh) | 1 | ||||
-rw-r--r-- | dist/install-login-shell.sh | 12 | ||||
-rw-r--r--[-rwxr-xr-x] | games/aaf.sh (renamed from games/aaf) | 0 | ||||
-rw-r--r--[-rwxr-xr-x] | games/dr.sh (renamed from games/dr) | 0 | ||||
-rw-r--r--[-rwxr-xr-x] | games/rndn.sh (renamed from games/rndn) | 0 | ||||
-rw-r--r--[-rwxr-xr-x] | games/xyzzy.sh (renamed from games/xyzzy) | 0 | ||||
-rw-r--r--[-rwxr-xr-x] | lint/bash.sh (renamed from lint/bash) | 1 | ||||
-rwxr-xr-x | lint/bin | 11 | ||||
-rw-r--r-- | lint/bin.sh | 1 | ||||
-rwxr-xr-x | lint/games | 11 | ||||
-rw-r--r-- | lint/games.sh | 1 | ||||
-rw-r--r--[-rwxr-xr-x] | lint/ksh.sh (renamed from lint/ksh) | 1 | ||||
-rw-r--r--[-rwxr-xr-x] | lint/sh.sh (renamed from lint/sh) | 1 | ||||
-rw-r--r--[-rwxr-xr-x] | lint/urxvt.sh (renamed from lint/urxvt) | 1 | ||||
-rw-r--r--[-rwxr-xr-x] | lint/yash.sh (renamed from lint/yash) | 1 | ||||
-rw-r--r-- | sh/shrc.d/ls.sh | 6 | ||||
m--------- | vim/bundle/html5 | 0 | ||||
m--------- | vim/bundle/unimpaired | 0 |
120 files changed, 281 insertions, 217 deletions
@@ -1,43 +1,132 @@ +bin/ap +bin/apf +bin/ax +bin/bcq +bin/bel +bin/bl +bin/bp +bin/br bin/brnl +bin/ca +bin/cf +bin/cfr +bin/chc +bin/chn +bin/clog +bin/clrd +bin/clwr bin/csmw +bin/d2u bin/ddup +bin/dmp +bin/dub +bin/edda +bin/eds +bin/exm +bin/fgscr +bin/finc +bin/fnl +bin/gms +bin/grc +bin/gscr bin/gwp -bin/jfp bin/han bin/hms bin/htdec bin/htenc bin/htref +bin/hurl +bin/igex +bin/isgr +bin/ix +bin/jfc +bin/jfcd +bin/jfp +bin/loc bin/max +bin/maybe bin/mean bin/med +bin/mex bin/mftl bin/min +bin/mkcp +bin/mkmv +bin/mktd bin/mode +bin/motd +bin/murl bin/nlbr bin/onl +bin/osc +bin/pa +bin/paz +bin/pit +bin/plmu +bin/pp +bin/pph +bin/pwg bin/quo +bin/rfcf +bin/rfcr bin/rfct +bin/rgl +bin/rnda +bin/rndf bin/rndi +bin/rndl +bin/rnds bin/sd2u bin/sec +bin/shb +bin/slow +bin/sls bin/slsf +bin/sqs +bin/sra +bin/sshi +bin/sta +bin/stbl +bin/stex +bin/stws bin/su2d +bin/sue +bin/supp +bin/swr +bin/td +bin/tl +bin/tlcs +bin/tm bin/tot +bin/try +bin/u2d +bin/umake bin/unf +bin/urlc +bin/urlh +bin/urlmt bin/uts +bin/vest +bin/vex +bin/wro +bin/xgo +bin/xgoc +bin/xrbg bin/xrq +games/aaf games/acq games/aesth games/chkl +games/dr games/drakon games/kvlt +games/rndn games/rot13 games/strik +games/xyzzy games/zs git/gitconfig gnupg/gpg.conf -mail/mailrc man/man7/dotfiles.7df tmux/tmux.conf urxvt/ext/select diff --git a/ISSUES.markdown b/ISSUES.markdown index 9a2877d3..4c78a3f3 100644 --- a/ISSUES.markdown +++ b/ISSUES.markdown @@ -21,5 +21,3 @@ Known issues * Would be good to complete the Makefile variables for NAME, EMAIL etc with educated guesses (`id -u`@`cat /etc/mailname`) etc rather than hardcoding my own stuff in there -* vim's implementation of ex clears the screen; would be good to find a way - to prevent that (preferably without something awful like `TERM=t100 ex`). @@ -6,7 +6,6 @@ install \ install-abook \ install-bash \ - install-bash-completion \ install-bin \ install-bin-man \ install-curl \ @@ -68,43 +67,133 @@ EMAIL = tom@sanctum.geek.nz KEY = 0xC14286EA77BB8872 SENDMAIL = msmtp -BINS = bin/brnl \ +BINS = bin/ap \ + bin/apf \ + bin/ax \ + bin/bcq \ + bin/bel \ + bin/bl \ + bin/bp \ + bin/br \ + bin/brnl \ + bin/ca \ + bin/cf \ + bin/cfr \ + bin/chc \ + bin/chn \ + bin/clog \ + bin/clrd \ + bin/clwr \ bin/csmw \ + bin/d2u \ bin/ddup \ + bin/dmp \ + bin/dub \ + bin/edda \ + bin/eds \ + bin/exm \ + bin/fgscr \ + bin/finc \ + bin/fnl \ + bin/gms \ + bin/grc \ + bin/gscr \ bin/gwp \ bin/han \ bin/hms \ bin/htdec \ bin/htenc \ bin/htref \ + bin/hurl \ + bin/igex \ + bin/isgr \ + bin/ix \ + bin/jfc \ + bin/jfcd \ bin/jfp \ + bin/loc \ bin/max \ + bin/maybe \ bin/mean \ bin/med \ + bin/mex \ bin/mftl \ bin/min \ + bin/mkcp \ + bin/mkmv \ + bin/mktd \ bin/mode \ + bin/motd \ + bin/murl \ bin/nlbr \ bin/onl \ + bin/osc \ + bin/pa \ + bin/paz \ + bin/pit \ + bin/plmu \ + bin/pp \ + bin/pph \ + bin/pwg \ bin/quo \ + bin/rfcf \ + bin/rfcr \ bin/rfct \ + bin/rgl \ + bin/rnda \ + bin/rndf \ bin/rndi \ + bin/rndl \ + bin/rnds \ bin/sd2u \ bin/sec \ + bin/shb \ + bin/slow \ + bin/sls \ bin/slsf \ + bin/sqs \ + bin/sra \ + bin/sshi \ + bin/sta \ + bin/stbl \ + bin/stex \ + bin/stws \ bin/su2d \ + bin/sue \ + bin/supp \ + bin/swr \ + bin/td \ + bin/tl \ + bin/tlcs \ + bin/tm \ bin/tot \ + bin/try \ + bin/u2d \ + bin/umake \ bin/unf \ + bin/urlc \ + bin/urlh \ + bin/urlmt \ bin/uts \ + bin/vest \ + bin/vex \ + bin/wro \ + bin/xgo \ + bin/xgoc \ + bin/xrbg \ bin/xrq -GAMES = games/acq \ +GAMES = games/aaf \ + games/acq \ games/aesth \ games/chkl \ + games/dr \ games/drakon \ games/kvlt \ + games/rndn \ games/rot13 \ games/strik \ + games/xyzzy \ games/zs all: $(BINS) git/gitconfig gnupg/gpg.conf @@ -147,46 +236,45 @@ tmux/tmux.conf: tmux/tmux.conf.m4 tmux/tmux.conf.m4 > $@ .awk: - bin/shb awk -f < $< > $@ + sh bin/shb.sh awk -f < $< > $@ chmod +x ./$@ .bash: - bin/shb bash < $< > $@ + sh bin/shb.sh bash < $< > $@ chmod +x ./$@ .pl: - bin/shb perl < $< > $@ + sh bin/shb.sh perl < $< > $@ chmod +x ./$@ .sed: - bin/shb sed -f < $< > $@ + sh bin/shb.sh sed -f < $< > $@ chmod +x ./$@ -install: install-bash \ - install-bash-completion \ - install-bin \ +.sh: + sh bin/shb.sh sh < $< > $@ + chmod +x ./$@ + +install: install-bin \ install-curl \ install-ex \ install-git \ install-gnupg \ install-less \ install-readline \ - install-sh \ + install-login-shell \ install-vim install-abook: mkdir -p -- $(HOME)/.abook cp -p -- abook/abookrc $(HOME)/.abook -install-bash: check-bash install-sh - mkdir -p -- $(HOME)/.bashrc.d +install-bash: install-sh + mkdir -p -- $(HOME)/.bashrc.d $(HOME)/.bash_completion.d $(HOME)/.config cp -p -- bash/bashrc $(HOME)/.bashrc cp -p -- bash/bashrc.d/* $(HOME)/.bashrc.d cp -p -- bash/bash_profile $(HOME)/.bash_profile cp -p -- bash/bash_logout $(HOME)/.bash_logout - -install-bash-completion: install-bash - mkdir -p -- $(HOME)/.bash_completion.d $(HOME)/.config cp -p -- bash/bash_completion $(HOME)/.config cp -p -- bash/bash_completion.d/* $(HOME)/.bash_completion.d @@ -247,7 +335,7 @@ install-i3: install-x install-less: cp -p -- less/lesskey $(HOME)/.lesskey - command -v lesskey && lesskey + lesskey install-mutt: mkdir -p -- $(HOME)/.muttrc.d $(HOME)/.cache/mutt @@ -265,12 +353,15 @@ install-newsbeuter: install-mysql: cp -p -- mysql/my.cnf $(HOME)/.my.cnf -install-ksh: check-ksh install-sh +install-ksh: install-sh mkdir -p -- $(HOME)/.shrc.d $(HOME)/.kshrc.d cp -p -- ksh/shrc.d/* $(HOME)/.shrc.d cp -p -- ksh/kshrc $(HOME)/.kshrc cp -p -- ksh/kshrc.d/* $(HOME)/.kshrc.d +install-login-shell: + sh dist/install-login-shell.sh + install-perlcritic: cp -p -- perlcritic/perlcriticrc $(HOME)/.perlcriticrc @@ -283,7 +374,7 @@ install-psql: install-readline: cp -p -- readline/inputrc $(HOME)/.inputrc -install-sh: check-sh +install-sh: mkdir -p -- $(HOME)/.profile.d $(HOME)/.shrc.d cp -p -- sh/profile $(HOME)/.profile cp -p -- sh/profile.d/* $(HOME)/.profile.d @@ -302,7 +393,7 @@ install-terminfo: install-tmux: tmux/tmux.conf install-terminfo cp -p -- tmux/tmux.conf $(HOME)/.tmux.conf -install-urxvt: urxvt/ext/select check-urxvt +install-urxvt: urxvt/ext/select mkdir -p -- $(HOME)/.urxvt/ext find urxvt/ext -type f ! -name '*.pl' \ -exec cp -p -- {} $(HOME)/.urxvt/ext \; @@ -322,10 +413,8 @@ install-gvim-config: install-vim-plugins: install-vim-config find vim/after vim/bundle -name .git -prune -o \ - -type d -exec sh -c 'mkdir -p -- \ - $(HOME)/."$$1"' _ {} \; -o \ - -type f -exec sh -c 'cp -p -- \ - "$$1" $(HOME)/."$$1"' _ {} \; + -type d -exec sh -c 'mkdir -p -- $(HOME)/."$$1"' _ {} \; -o \ + -type f -exec sh -c 'cp -p -- "$$1" $(HOME)/."$$1"' _ {} \; install-vim-pathogen: install-vim-plugins mkdir -p -- $(HOME)/.vim/autoload @@ -344,13 +433,13 @@ install-x: cp -p -- X/Xresources $(HOME)/.Xresources cp -p -- X/Xresources.d/* $(HOME)/.Xresources.d -install-yash: check-yash install-sh +install-yash: install-sh mkdir -p -- $(HOME)/.yashrc.d cp -p -- yash/yash_profile $(HOME)/.yash_profile cp -p -- yash/yashrc $(HOME)/.yashrc cp -p -- yash/yashrc.d/* $(HOME)/.yashrc.d -install-zsh: check-zsh install-sh +install-zsh: install-sh mkdir -p -- $(HOME)/.profile.d $(HOME)/.zshrc.d cp -p -- zsh/profile.d/* $(HOME)/.profile.d cp -p -- zsh/zprofile $(HOME)/.zprofile @@ -365,31 +454,31 @@ check: check-bash \ check-urxvt check-bash: - check/bash + sh check/bash.sh -check-bin: $(BINS) - check/bin +check-bin: + sh check/bin.sh -check-games: $(GAMES) - check/games +check-games: + sh check/games.sh check-man: - check/man + sh check/man.sh check-ksh: - check/ksh + sh check/ksh.sh check-sh: - check/sh + sh check/sh.sh check-urxvt: - check/urxvt + sh check/urxvt.sh check-yash: - check/yash + sh check/yash.sh check-zsh: - check/zsh + sh check/zsh.sh lint: check \ lint-bash \ @@ -401,22 +490,22 @@ lint: check \ lint-yash lint-bash: - lint/bash + sh lint/bash.sh -lint-bin: $(BINS) - lint/bin +lint-bin: + sh lint/bin.sh -lint-games: $(GAMES) - lint/games +lint-games: + sh lint/games.sh lint-ksh: - lint/ksh + sh lint/ksh.sh lint-sh: - lint/sh + sh lint/sh.sh lint-urxvt: - lint/urxvt + sh lint/urxvt.sh lint-yash: - lint/yash + sh lint/yash.sh diff --git a/README.markdown b/README.markdown index 43dddf0c..1b53ae58 100644 --- a/README.markdown +++ b/README.markdown @@ -15,7 +15,14 @@ Installation $ make -n install $ make install -For the default `all` target, you'll need `bash(1)`, `make(1)`, and `m4(1)`. +For the default `all` target, you'll need `make(1)`, `m4(1)`, and a +POSIX-fearing environment, including `sh(1)`. This should work on most +GNU/Linux and BSD systems, and possibly on other UNIX types, but those are not +as thoroughly or frequently tested. + +If you're on a system where `/bin/sh` is not a POSIX shell (e.g. OpenSolaris), +you may need to check you have e.g. `/usr/xpg4/bin` at the front of your +`$PATH` at build time. The installation `Makefile` will overwrite things standing in the way of its installed files without backing them up, so read the output of `make -n @@ -28,9 +35,9 @@ directory so you can explore: $ env -i HOME="$tmpdir" TERM="$TERM" bash -l The default `install` target will install these targets and all their -dependencies: +dependencies. Note that you don't actually have to have any of this except `sh` +installed. -* `install-bash` * `install-bin` * `install-bin-man` * `install-curl` @@ -38,12 +45,15 @@ dependencies: * `install-git` * `install-gnupg` * `install-less` +* `install-login-shell` * `install-readline` -* `install-sh` * `install-vim` +The `install-login-shell` looks at your `SHELL` environment variable and tries +to figure out which shell to install, falling back on just plain `install-sh`. + The remaining dotfiles can be installed with the other `install-*` targets. Try -`bin/mftl Makefile` in the project's root directory to see a list. +`sh bin/mftl.sh Makefile` in the project's root directory to see a list. Tools ----- @@ -70,7 +80,6 @@ Configuration is included for: elements * [i3](https://i3wm.org/) -- Tiling window manager * [less](https://www.gnu.org/software/less/) -- Terminal pager -* `mail(1)` -- classic mail program * [Mutt](http://www.mutt.org/) -- Terminal mail user agent * [`mysql(1)`](http://linux.die.net/man/1/mysql) -- Command-line MySQL client * [Ncmpcpp](https://rybczak.net/ncmpcpp/) -- ncurses music player client @@ -147,8 +156,8 @@ A terminal session with my prompt looks something like this: tom@remote:~/.dotfiles(master+!){1}$ The username and hostname are elided if not connected via SSH. The working -directory is always shown. The rest of the prompt expands based on context to -include these elements in this order: +directory with tilde abbreviation for `$HOME` is always shown. The rest of the +prompt expands based on context to include these elements in this order: * Whether in a Git repository if applicable, and punctuation to show repository status including reference to upstreams at a glance. Subversion diff --git a/bash/bash_profile b/bash/bash_profile index a520f051..0376ee57 100644 --- a/bash/bash_profile +++ b/bash/bash_profile @@ -1,6 +1,13 @@ # Load ~/.profile regardless of shell version [ -e "$HOME"/.profile ] && . "$HOME"/.profile +# If POSIXLY_CORRECT is set after doing that, force the `posix` option on and +# don't load the rest of this stuff--so, just ~/.profile and ENV +if [ -n "$POSIXLY_CORRECT" ] ; then + set -o posix + return +fi + # If ~/.bashrc exists, source that too; the tests for both interactivity and # >=2.05a (for features like [[) are in there [ -f "$HOME"/.bashrc ] && . "$HOME"/.bashrc @@ -1,4 +1,3 @@ -#!/bin/sh # Run a program with args read from standard input, prompted if from term if [ "$#" -eq 0 ] ; then printf >&2 'ap: Need at least one argument (command name)\n' diff --git a/bin/apf b/bin/apf.sh index 39bc0720..5e40e9b8 100755..100644 --- a/bin/apf +++ b/bin/apf.sh @@ -1,4 +1,3 @@ -#!/bin/sh # Prepend arguments from a file to the given arguments for a command self=apf @@ -1,4 +1,3 @@ -#!/bin/sh # Evaluate an Awk expression given on the command line with an optional format # Count arguments diff --git a/bin/bcq b/bin/bcq.sh index 7b950b56..71a79666 100755..100644 --- a/bin/bcq +++ b/bin/bcq.sh @@ -1,4 +1,3 @@ -#!/bin/sh # Fire up bc(1), hushing it if it looks like GNU [ -e "$HOME"/.cache/bc/quiet ] && set -- --quiet "$@" exec bc "$@" diff --git a/bin/bel b/bin/bel.sh index c1c2ce1c..e87eceda 100755..100644 --- a/bin/bel +++ b/bin/bel.sh @@ -1,3 +1,2 @@ -#!/bin/sh # Print a terminal bell printf '\a' @@ -1,4 +1,3 @@ -#!/bin/sh # Generate blank lines if [ "$#" -ne 1 ] || [ "$1" -lt 0 ] ; then printf >&2 'bl: Non-negative line count needed as sole argument\n' @@ -1,3 +1,2 @@ -#!/bin/sh # Read an URL and then browse to it, saving the annoyance of quoting URLs ap br URL @@ -1,3 +1,2 @@ -#!/bin/sh # Just launch $BROWSER with any given arguments exec "$BROWSER" "$@" @@ -1,3 +1,2 @@ -#!/bin/sh # Print a count of the number of arguments printf '%u\n' "$#" @@ -1,4 +1,3 @@ -#!/bin/sh # Count entries in a given set of directories # Iterate over remaining non-option arguments (directories); default to current diff --git a/bin/cfr b/bin/cfr.sh index d49ab3d9..9d13785c 100755..100644 --- a/bin/cfr +++ b/bin/cfr.sh @@ -1,4 +1,3 @@ -#!/bin/sh # Count entries in a given set of directories # Iterate over remaining non-option arguments (directories); default to current diff --git a/bin/chc b/bin/chc.sh index b1e4000d..8b15317c 100755..100644 --- a/bin/chc +++ b/bin/chc.sh @@ -1,4 +1,3 @@ -#!/bin/sh # Cache the output of a command and emit it straight from the cache if not # expired on each run diff --git a/bin/chn b/bin/chn.sh index 46a8a27a..9103dd07 100755..100644 --- a/bin/chn +++ b/bin/chn.sh @@ -1,4 +1,3 @@ -#!/bin/sh # Repeat a command to filter input several times self=chn diff --git a/bin/clog b/bin/clog.sh index 037f24c7..0964ce90 100755..100644 --- a/bin/clog +++ b/bin/clog.sh @@ -1,4 +1,3 @@ -#!/bin/sh # Record a timestamped message to a logfile, defaulting to ~/.clog self=clog command -v rlwrap >/dev/null 2>&1 && diff --git a/bin/clrd b/bin/clrd.sh index 0b460671..bf239033 100755..100644 --- a/bin/clrd +++ b/bin/clrd.sh @@ -1,4 +1,3 @@ -#!/bin/sh # Clear the screen and read a file as it's written line-by-line self=clrd diff --git a/bin/clwr b/bin/clwr.sh index dc045e9d..897c1a01 100755..100644 --- a/bin/clwr +++ b/bin/clwr.sh @@ -1,4 +1,3 @@ -#!/bin/sh # Write lines of terminal input into a file, clearing in between each one self=clwr diff --git a/bin/d2u b/bin/d2u.sh index 6fe362b7..22c8e16b 100755..100644 --- a/bin/d2u +++ b/bin/d2u.sh @@ -1,4 +1,3 @@ -#!/bin/sh # Convert DOS line endings to UNIX ones # Check arguments diff --git a/bin/dmp b/bin/dmp.sh index 4299771d..ea79214f 100755..100644 --- a/bin/dmp +++ b/bin/dmp.sh @@ -1,4 +1,3 @@ -#!/bin/sh # Get the password store directory, bail if we can't pwsd=${PASSWORD_STORE_DIR:-"$HOME"/.password-store} diff --git a/bin/dub b/bin/dub.sh index 36d787a4..f42c5ac9 100755..100644 --- a/bin/dub +++ b/bin/dub.sh @@ -1,4 +1,3 @@ -#!/bin/sh # List the biggest files in a directory # First optional argument is the directory, defaulting to the diff --git a/bin/edda b/bin/edda.sh index 6af88a5f..b1d7b27a 100755..100644 --- a/bin/edda +++ b/bin/edda.sh @@ -1,4 +1,3 @@ -#!/bin/sh # Run ed(1) over multiple files, duplicating stdin. self=edda diff --git a/bin/eds b/bin/eds.sh index e39215d4..c85069c6 100755..100644 --- a/bin/eds +++ b/bin/eds.sh @@ -1,4 +1,3 @@ -#!/bin/sh # Create and edit executable scripts in a directory EDSPATH (defaults to ~/.local/bin) # Need at least one script name diff --git a/bin/exm b/bin/exm.sh index 3f4b4c1b..25e3006f 100755..100644 --- a/bin/exm +++ b/bin/exm.sh @@ -1,7 +1,6 @@ -#!/bin/sh # Prevent Vim's ex(1) implementation from clearing the screen if [ -t 0 ] ; then - ver=$(ex --version 2>/dev/null | sed '1{s/ .*//;q;}') + ver=$(ex --version 2>/dev/null | awk 'NR==1{print $1;exit}') case $ver in # Lie to Vim; tell it it's a dumb terminal, and that its required "cm" # feature is invoked with a carriage return. diff --git a/bin/fgscr b/bin/fgscr.sh index 7d5ff4c5..137e0dd8 100755..100644 --- a/bin/fgscr +++ b/bin/fgscr.sh @@ -1,4 +1,3 @@ -#!/bin/sh # Find all the Git repositories in a directory and scrub them all # Check we have gscr(1df) first diff --git a/bin/finc b/bin/finc.sh index 109f02b3..2bbb9ae8 100755..100644 --- a/bin/finc +++ b/bin/finc.sh @@ -1,3 +1,2 @@ -#!/bin/sh # Count the number of entries from a find(1) condition find "${@:-.}" -exec printf .%sx {} + | wc -c diff --git a/bin/fnl b/bin/fnl.sh index 6969665b..8d771adb 100755..100644 --- a/bin/fnl +++ b/bin/fnl.sh @@ -1,4 +1,3 @@ -#!/bin/sh # Run a command and save its output and error to temporary files # Check we have at least one argument diff --git a/bin/gms b/bin/gms.sh index 01cdaa2f..b77da6fa 100755..100644 --- a/bin/gms +++ b/bin/gms.sh @@ -1,4 +1,3 @@ -#!/bin/sh # Run getmail(1) over every getmailrc.* file in ~/.getmail # Trap to remove whatever's set in lockdir if we're killed diff --git a/bin/grc b/bin/grc.sh index 0db91afa..184baf8e 100755..100644 --- a/bin/grc +++ b/bin/grc.sh @@ -1,4 +1,3 @@ -#!/bin/sh # Check whether a directory is a Git repository with uncommitted changes # Enter given directory or bail diff --git a/bin/gscr b/bin/gscr.sh index cac969fe..2fbee05a 100755..100644 --- a/bin/gscr +++ b/bin/gscr.sh @@ -1,4 +1,3 @@ -#!/bin/sh # Scrub and pack Git repositories # Iterate through given directories; default to the current one diff --git a/bin/hurl b/bin/hurl.sh index 16ea48f8..0680c5ce 100755..100644 --- a/bin/hurl +++ b/bin/hurl.sh @@ -1,4 +1,3 @@ -#!/bin/sh # Extract <a href="..."> URLs from an HTML document or documents # Input is either stdin or the given arguments concatenated diff --git a/bin/igex b/bin/igex.sh index c514006d..09f1206f 100755..100644 --- a/bin/igex +++ b/bin/igex.sh @@ -1,4 +1,3 @@ -#!/bin/sh # Run a command and ignore specified exit values # There should be at least two arguments diff --git a/bin/isgr b/bin/isgr.sh index 029b5352..9d3e97a8 100755..100644 --- a/bin/isgr +++ b/bin/isgr.sh @@ -1,4 +1,3 @@ -#!/bin/sh # Return an exit status for whether the current directory appears to be in a # Git working copy @@ -1,4 +1,3 @@ -#!/bin/sh # Convenience script for posting to ix.io pastebin cat -- "${@:--}" | curl -F 'f:1=<-' http://ix.io/ diff --git a/bin/jfc b/bin/jfc.sh index 33d0fe5d..3d155aca 100755..100644 --- a/bin/jfc +++ b/bin/jfc.sh @@ -1,4 +1,3 @@ -#!/bin/sh # Commit all changes to a Git repository with a stock message message # Enter the given directory, default to the current one diff --git a/bin/jfcd b/bin/jfcd.sh index 8bd54e3b..bf059883 100755..100644 --- a/bin/jfcd +++ b/bin/jfcd.sh @@ -1,4 +1,3 @@ -#!/bin/sh # Watch a directory for changes and commit them with jfc(1d) if there are any; # requires inotifywait(1) diff --git a/bin/loc b/bin/loc.sh index d92dc886..995c6932 100755..100644 --- a/bin/loc +++ b/bin/loc.sh @@ -1,4 +1,3 @@ -#!/bin/sh # Convenience find(1) wrapper for path substrings # Require at least one search term diff --git a/bin/maybe b/bin/maybe.sh index a2de17dd..6e5c8658 100755..100644 --- a/bin/maybe +++ b/bin/maybe.sh @@ -1,4 +1,3 @@ -#!/bin/sh # Exit with success or failure with a given probability self=maybe diff --git a/bin/mex b/bin/mex.sh index 005149d8..0b3d6c7e 100755..100644 --- a/bin/mex +++ b/bin/mex.sh @@ -1,4 +1,3 @@ -#!/bin/sh # Make the first non-executable instance of files with the given names in $PATH # executable self=mex diff --git a/bin/mkcp b/bin/mkcp.sh index 37bc87c0..10308263 100755..100644 --- a/bin/mkcp +++ b/bin/mkcp.sh @@ -1,4 +1,3 @@ -#!/bin/sh # Copy files into created directory in one call # Check we have at least two arguments diff --git a/bin/mkmv b/bin/mkmv.sh index 803ef05c..53b5aa8f 100755..100644 --- a/bin/mkmv +++ b/bin/mkmv.sh @@ -1,4 +1,3 @@ -#!/bin/sh # Move files into created directory in one call # Check we have at least two arguments diff --git a/bin/mktd b/bin/mktd.sh index 75bbb4b3..62b10396 100755..100644 --- a/bin/mktd +++ b/bin/mktd.sh @@ -1,4 +1,3 @@ -#!/bin/sh # Try to make a random temp directory # Get a random seed from rnds(1df); if it's empty, that's still workable diff --git a/bin/motd b/bin/motd.sh index ee60ad03..4ac88081 100755..100644 --- a/bin/motd +++ b/bin/motd.sh @@ -1,4 +1,3 @@ -#!/bin/sh # Show the system MOTD motd=${MOTD:-/etc/motd} [ -f "$motd" ] || exit diff --git a/bin/murl b/bin/murl.sh index 95db92c9..91304aa1 100755..100644 --- a/bin/murl +++ b/bin/murl.sh @@ -1,4 +1,3 @@ -#!/bin/sh # Format markdown and pass it to hurl to extract URLs from it. # Pipe the output of pandoc(1) on our args into hurl(1df) diff --git a/bin/osc b/bin/osc.sh index 87f79365..ba35d9b7 100755..100644 --- a/bin/osc +++ b/bin/osc.sh @@ -1,4 +1,3 @@ -#!/bin/sh # Sane and safe OpenSSL s_client(1ssl) connection self=osc @@ -1,4 +1,3 @@ -#!/bin/sh # Print arguments, one per line. Compare paz(1df). [ "$#" -gt 0 ] || exit 0 printf '%s\n' "$@" diff --git a/bin/paz b/bin/paz.sh index b1f09ca9..e9b81bd7 100755..100644 --- a/bin/paz +++ b/bin/paz.sh @@ -1,4 +1,3 @@ -#!/bin/sh # Print arguments, terminated by null chars. Compare pa(1df). [ "$#" -gt 0 ] || exit 0 printf '%s\0' "$@" diff --git a/bin/pit b/bin/pit.sh index d3068e76..377c1927 100755..100644 --- a/bin/pit +++ b/bin/pit.sh @@ -1,4 +1,3 @@ -#!/bin/sh # If no arguments, we'll use stdin if [ "$#" -eq 0 ] ; then diff --git a/bin/plmu b/bin/plmu.sh index cf9b7eae..d6f163e6 100755..100644 --- a/bin/plmu +++ b/bin/plmu.sh @@ -1,4 +1,3 @@ -#!/bin/sh # Set up exceptions file if it exists ef=$HOME/.plenv/non-cpanm-modules @@ -1,4 +1,3 @@ -#!/bin/sh # Print the full path to each argument; path need not exist for arg ; do case $arg in diff --git a/bin/pph b/bin/pph.sh index 7987382f..268b6ad7 100755..100644 --- a/bin/pph +++ b/bin/pph.sh @@ -1,4 +1,3 @@ -#!/bin/sh # Run pp(1df) on args, prefix with machine hostname hn=$(hostname -s) || exit pp "$@" | diff --git a/bin/pwg b/bin/pwg.sh index 97af3df4..e73ae97a 100755..100644 --- a/bin/pwg +++ b/bin/pwg.sh @@ -1,4 +1,3 @@ -#!/bin/sh # Shortcut to generate just one strong password with pwgen(1) # If any arguments are provided, those are used instead if [ "$#" -eq 0 ] ; then diff --git a/bin/rfcf b/bin/rfcf.sh index 6f257415..36b1a4c4 100755..100644 --- a/bin/rfcf +++ b/bin/rfcf.sh @@ -1,4 +1,3 @@ -#!/bin/sh # Check arguments if [ "$#" -ne 1 ] ; then diff --git a/bin/rfcr b/bin/rfcr.sh index 75d9abb0..860ae53d 100755..100644 --- a/bin/rfcr +++ b/bin/rfcr.sh @@ -1,4 +1,3 @@ -#!/bin/sh # Check arguments if [ "$#" -ne 1 ] ; then diff --git a/bin/rgl b/bin/rgl.sh index a06ecd0a..630d38b6 100755..100644 --- a/bin/rgl +++ b/bin/rgl.sh @@ -1,4 +1,3 @@ -#!/bin/sh # Read grep(1) patterns from input and search for them in the given files self=rgl diff --git a/bin/rnda b/bin/rnda.sh index 5af4a3bd..b09a8b6f 100755..100644 --- a/bin/rnda +++ b/bin/rnda.sh @@ -1,4 +1,3 @@ -#!/bin/sh # Choose a random argument using rndi(1df) # Check we have at least one argument diff --git a/bin/rndf b/bin/rndf.sh index 67f9d997..21aa76a6 100755..100644 --- a/bin/rndf +++ b/bin/rndf.sh @@ -1,4 +1,3 @@ -#!/bin/sh # Choose a random file from a given directory using rnda(1df); ignores dot # files diff --git a/bin/rndl b/bin/rndl.sh index c09c2c78..18bcec07 100755..100644 --- a/bin/rndl +++ b/bin/rndl.sh @@ -1,4 +1,3 @@ -#!/bin/sh # Print a random line from input self=rndl diff --git a/bin/rnds b/bin/rnds.sh index c5ffabe4..6b3ac904 100755..100644 --- a/bin/rnds +++ b/bin/rnds.sh @@ -1,4 +1,3 @@ -#!/bin/sh # Try to get a low-quality random seed from a random device if possible # Sole optional argument is the bytes to read; 32 is the default diff --git a/bin/shb b/bin/shb.sh index 72ac818b..7d31876d 100755..100644 --- a/bin/shb +++ b/bin/shb.sh @@ -1,4 +1,3 @@ -#!/bin/sh # Use PATH to build a shebang for a script given on stdin self=shb diff --git a/bin/slow b/bin/slow.sh index a7bdae76..b0047829 100755..100644 --- a/bin/slow +++ b/bin/slow.sh @@ -1,4 +1,3 @@ -#!/bin/sh # Convert uppercase letters in a stream to lowercase cat "${@:--}" | tr '[:upper:]' '[:lower:]' diff --git a/bin/sls b/bin/sls.sh index 770b8ec0..55c1dfc7 100755..100644 --- a/bin/sls +++ b/bin/sls.sh @@ -1,4 +1,3 @@ -#!/bin/sh # Print hostnames from ssh_config(5) files, defaulting to the usual paths # If we weren't given a file explicitly, we'll try to read both /etc/ssh_config diff --git a/bin/sqs b/bin/sqs.sh index d0b3023f..e00797e3 100755..100644 --- a/bin/sqs +++ b/bin/sqs.sh @@ -1,4 +1,3 @@ -#!/bin/sh # Chop a trailing query string off filenames self=sqs diff --git a/bin/sra b/bin/sra.sh index 7f072dfb..f3ed6f71 100755..100644 --- a/bin/sra +++ b/bin/sra.sh @@ -1,4 +1,3 @@ -#!/bin/sh # Run ssh(1) with an optional command on every host in sls(1df) output # Use FD3 to keep a reference to the script's stdin for the ssh(1) calls exec 3<&0 diff --git a/bin/sshi b/bin/sshi.sh index 80e00a10..0d1591f1 100755..100644 --- a/bin/sshi +++ b/bin/sshi.sh @@ -1,4 +1,3 @@ -#!/bin/sh # Print some human-readable information from SSH_CONNECTION # Check we have an SSH_CONNECTION variable diff --git a/bin/sta b/bin/sta.sh index 848d9740..5736842a 100755..100644 --- a/bin/sta +++ b/bin/sta.sh @@ -1,4 +1,3 @@ -#!/bin/sh # Print list of sls(1df) hostnames that exit 0 when a connection is attempted # and the optional given command is run. Discard stdout, but preserve stderr. sls | while read -r hostname ; do diff --git a/bin/stbl b/bin/stbl.sh index 34a06251..23d77703 100755..100644 --- a/bin/stbl +++ b/bin/stbl.sh @@ -1,4 +1,3 @@ -#!/bin/sh # Strip a trailing blank line from the given files with ed(1) # Check arguments diff --git a/bin/stex b/bin/stex.sh index f1f9c029..14d2cabf 100755..100644 --- a/bin/stex +++ b/bin/stex.sh @@ -1,4 +1,3 @@ -#!/bin/sh # Strip an extension from the given filenames self=stex diff --git a/bin/stws b/bin/stws.sh index 2ceae935..ce2c14d0 100755..100644 --- a/bin/stws +++ b/bin/stws.sh @@ -1,4 +1,3 @@ -#!/bin/sh # Strip trailing spaces on one or more files # Check arguments diff --git a/bin/sue b/bin/sue.sh index 64d566f7..654c041f 100755..100644 --- a/bin/sue +++ b/bin/sue.sh @@ -1,4 +1,3 @@ -#!/bin/sh # Run sudoedit(8) with an appropriate user on a set of files # Blank out the user variable diff --git a/bin/supp b/bin/supp.sh index 1ba6c850..5ddbadc3 100755..100644 --- a/bin/supp +++ b/bin/supp.sh @@ -1,4 +1,3 @@ -#!/bin/sh # Convert lowercase letters in a stream to uppercase cat "${@:--}" | tr '[:lower:]' '[:upper:]' diff --git a/bin/swr b/bin/swr.sh index 56ab5919..47c84b86 100755..100644 --- a/bin/swr +++ b/bin/swr.sh @@ -1,4 +1,3 @@ -#!/bin/sh # Transparently wrap scp(1) targets on the command line self=swr @@ -1,4 +1,3 @@ -#!/bin/sh # Manage to-do files with just $EDITOR and git(1) # Specify the path and file @@ -1,4 +1,3 @@ -#!/bin/sh # Tag lines from files or stdin with a string prefix or suffix self=tl diff --git a/bin/tlcs b/bin/tlcs.sh index aa0d2f25..f20b160e 100755..100644 --- a/bin/tlcs +++ b/bin/tlcs.sh @@ -1,4 +1,3 @@ -#!/bin/sh # Execute a command and tag the output of the stdout and stderr streams. self=tlcs @@ -1,4 +1,3 @@ -#!/bin/sh # Attach to existing tmux session rather than create a new one if possible # If given any arguments, just use them as they are diff --git a/bin/try b/bin/try.sh index 7d6d57a8..20ccbe5f 100755..100644 --- a/bin/try +++ b/bin/try.sh @@ -1,4 +1,3 @@ -#!/bin/sh # Attempt a certain number of times to perform a task, buffer stderr unless and # until all command attempts fail self=try diff --git a/bin/u2d b/bin/u2d.sh index 505b3d04..9f4e800a 100755..100644 --- a/bin/u2d +++ b/bin/u2d.sh @@ -1,4 +1,3 @@ -#!/bin/sh # Convert UNIX line endings to DOS ones # Check arguments diff --git a/bin/umake b/bin/umake.sh index e8de7ae6..21073328 100755..100644 --- a/bin/umake +++ b/bin/umake.sh @@ -1,4 +1,3 @@ -#!/bin/sh # Keep going up the tree until we find a Makefile, and then run make(1) with # any given args while [ "$PWD" != / ] ; do diff --git a/bin/urlc b/bin/urlc.sh index a949f50d..0e6530fa 100755..100644 --- a/bin/urlc +++ b/bin/urlc.sh @@ -1,4 +1,3 @@ -#!/bin/sh # Try to find erroneous or insecure URLs self=urlc diff --git a/bin/urlh b/bin/urlh.sh index 8e9463e7..5b5cab74 100755..100644 --- a/bin/urlh +++ b/bin/urlh.sh @@ -1,4 +1,3 @@ -#!/bin/sh # Get values for HTTP headers for the given URL # Check arguments diff --git a/bin/urlmt b/bin/urlmt.sh index b209f26a..cd71b0fd 100755..100644 --- a/bin/urlmt +++ b/bin/urlmt.sh @@ -1,4 +1,3 @@ -#!/bin/sh # Get the MIME type for a given URL urlh "$1" Content-Type | diff --git a/bin/vest b/bin/vest.sh index f857d8c1..7dd65f0b 100755..100644 --- a/bin/vest +++ b/bin/vest.sh @@ -1,4 +1,3 @@ -#!/bin/sh # Run a test(1) command and print a string to stdout showing pass/fail if [ "$#" -eq 0 ] ; then printf >&2 'vest: Need test(1) arguments\n' diff --git a/bin/vex b/bin/vex.sh index 908288ba..8a696577 100755..100644 --- a/bin/vex +++ b/bin/vex.sh @@ -1,4 +1,3 @@ -#!/bin/sh # Run a command and print a string to stdout showing pass/fail if [ "$#" -eq 0 ] ; then printf >&2 'vex: Need a command\n' diff --git a/bin/wro b/bin/wro.sh index 4c465adb..3888c526 100755..100644 --- a/bin/wro +++ b/bin/wro.sh @@ -1,4 +1,3 @@ -#!/bin/sh # Add an email-style quote header to input self=wro diff --git a/bin/xgo b/bin/xgo.sh index 652d5a14..4d7cf922 100755..100644 --- a/bin/xgo +++ b/bin/xgo.sh @@ -1,4 +1,3 @@ -#!/bin/sh # Test and open a clipboard URL with an apt program # Check arguments diff --git a/bin/xgoc b/bin/xgoc.sh index 516f7028..42e04e2d 100755..100644 --- a/bin/xgoc +++ b/bin/xgoc.sh @@ -1,3 +1,2 @@ -#!/bin/sh # Run xgo(1df) with the contents of the X clipboard xgo "$(xsel)" diff --git a/bin/xrbg b/bin/xrbg.sh index 801bf078..617a9b43 100755..100644 --- a/bin/xrbg +++ b/bin/xrbg.sh @@ -1,4 +1,3 @@ -#!/bin/sh # Apply a random background image. Requires rndf(1df) and feh(1). bg=$(rndf "${XBACKGROUNDS:-"$HOME"/.xbackgrounds}") || exit feh --bg-scale --no-fehbg -- "$bg" diff --git a/check/bash b/check/bash.sh index 525bec34..a3efccb1 100755..100644 --- a/check/bash +++ b/check/bash.sh @@ -1,4 +1,3 @@ -#!/bin/sh for bash in bash/* bash/bashrc.d/* ; do [ -f "$bash" ] || continue bash -n "$bash" || exit diff --git a/check/bin b/check/bin deleted file mode 100755 index 2fc4e767..00000000 --- a/check/bin +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/sh -for bin in bin/* ; do - [ -x "$bin" ] || continue - hb=$(sed 1q "$bin") || exit - case $hb in - *bash) - bash -n "$bin" || exit - ;; - *sh) - sh -n "$bin" || exit - ;; - esac -done -printf 'All shell scripts in bin parsed successfully.\n' diff --git a/check/bin.sh b/check/bin.sh new file mode 100644 index 00000000..04b0da6b --- /dev/null +++ b/check/bin.sh @@ -0,0 +1,4 @@ +for bin in bin/*.sh ; do + sh -n "$bin" || exit +done +printf 'All shell scripts in bin parsed successfully.\n' diff --git a/check/games b/check/games deleted file mode 100755 index d3b5feac..00000000 --- a/check/games +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/sh -for game in games/* ; do - [ -x "$game" ] || continue - hb=$(sed 1q "$game") || exit - case $hb in - *bash) - bash -n "$game" || exit - ;; - *sh) - sh -n "$game" || exit - ;; - esac -done -printf 'All shell scripts in games parsed successfully.\n' diff --git a/check/games.sh b/check/games.sh new file mode 100644 index 00000000..79d53ed5 --- /dev/null +++ b/check/games.sh @@ -0,0 +1,4 @@ +for game in games/*.sh ; do + sh -n "$game" || exit +done +printf 'All shell scripts in games parsed successfully.\n' diff --git a/check/ksh b/check/ksh.sh index 3136c413..51e71e19 100755..100644 --- a/check/ksh +++ b/check/ksh.sh @@ -1,4 +1,3 @@ -#!/bin/sh for ksh in ksh/* ksh/kshrc.d/* ; do [ -f "$ksh" ] || continue ksh -n "$ksh" || exit diff --git a/check/man b/check/man.sh index ca1c248c..89c03890 100755..100644 --- a/check/man +++ b/check/man.sh @@ -1,4 +1,3 @@ -#!/bin/sh # Check that manual pages and logical binaries match up # Need some scripts from the source directory diff --git a/check/sh b/check/sh.sh index ec3ba339..53d8c4b6 100755..100644 --- a/check/sh +++ b/check/sh.sh @@ -1,4 +1,3 @@ -#!/bin/sh for sh in sh/* sh/profile.d/* sh/shrc.d/* ; do [ -f "$sh" ] || continue sh -n "$sh" || exit diff --git a/check/urxvt b/check/urxvt deleted file mode 100755 index a40f8559..00000000 --- a/check/urxvt +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/sh -for perl in urxvt/ext/* ; do - [ -f "$perl" ] || continue - case $perl in - *.pl) ;; - *) perl -c "$perl" >/dev/null || exit ;; - esac -done -printf 'All Perl scripts in urxvt/ext parsed successfully.\n' diff --git a/check/urxvt.sh b/check/urxvt.sh new file mode 100644 index 00000000..ee39e6c9 --- /dev/null +++ b/check/urxvt.sh @@ -0,0 +1,4 @@ +for perl in urxvt/ext/*.pl ; do + perl -c "$perl" || exit +done +printf 'All Perl scripts in urxvt/ext parsed successfully.\n' diff --git a/check/yash b/check/yash.sh index fb737596..c8722f3d 100755..100644 --- a/check/yash +++ b/check/yash.sh @@ -1,4 +1,3 @@ -#!/bin/sh for yash in yash/* ; do [ -f "$yash" ] || continue yash -n "$yash" || exit diff --git a/check/zsh b/check/zsh.sh index 39a6c1e9..50335d56 100755..100644 --- a/check/zsh +++ b/check/zsh.sh @@ -1,4 +1,3 @@ -#!/bin/sh for zsh in zsh/* zsh/zshrc.d/* ; do [ -f "$zsh" ] || continue zsh -n "$zsh" || exit diff --git a/dist/install-login-shell.sh b/dist/install-login-shell.sh new file mode 100644 index 00000000..b7292a77 --- /dev/null +++ b/dist/install-login-shell.sh @@ -0,0 +1,12 @@ +target=install-sh +case ${SHELL##*/} in + bash) + target=install-bash ;; + ksh|ksh88|ksh93|mksh|pdksh) + target=install-ksh ;; + yash) + target=install-yash ;; + zsh) + target=install-zsh ;; +esac +make "$target" diff --git a/games/aaf b/games/aaf.sh index 4f1825c6..4f1825c6 100755..100644 --- a/games/aaf +++ b/games/aaf.sh diff --git a/games/dr b/games/dr.sh index e1db163d..e1db163d 100755..100644 --- a/games/dr +++ b/games/dr.sh diff --git a/games/rndn b/games/rndn.sh index 18c34218..18c34218 100755..100644 --- a/games/rndn +++ b/games/rndn.sh diff --git a/games/xyzzy b/games/xyzzy.sh index d262c0e6..d262c0e6 100755..100644 --- a/games/xyzzy +++ b/games/xyzzy.sh diff --git a/lint/bash b/lint/bash.sh index 771f2a89..2fe1ba13 100755..100644 --- a/lint/bash +++ b/lint/bash.sh @@ -1,2 +1 @@ -#!/bin/sh find bash -type f -print -exec shellcheck -e SC1090 -s bash -- {} + diff --git a/lint/bin b/lint/bin deleted file mode 100755 index 1130e432..00000000 --- a/lint/bin +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/sh -for bin in bin/* ; do - [ -f "$bin" ] || continue - hb=$(sed 1q "$bin") || exit - case $hb in - *sh) - printf '%s\n' "$bin" - shellcheck -- "$bin" - ;; - esac -done diff --git a/lint/bin.sh b/lint/bin.sh new file mode 100644 index 00000000..0fe82d7a --- /dev/null +++ b/lint/bin.sh @@ -0,0 +1 @@ +find bin -type f -name '*.sh' -print -exec shellcheck -e SC1090 -s sh -- {} + diff --git a/lint/games b/lint/games deleted file mode 100755 index ef451f4e..00000000 --- a/lint/games +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/sh -for game in games/* ; do - [ -f "$game" ] || continue - hb=$(sed 1q "$game") || exit - case $hb in - *sh) - printf '%s\n' "$game" - shellcheck -- "$game" - ;; - esac -done diff --git a/lint/games.sh b/lint/games.sh new file mode 100644 index 00000000..6e3e3024 --- /dev/null +++ b/lint/games.sh @@ -0,0 +1 @@ +find games -type f -name '*.sh' -print -exec shellcheck -e SC1090 -s sh -- {} + diff --git a/lint/ksh b/lint/ksh.sh index ee49d178..4cedc6f7 100755..100644 --- a/lint/ksh +++ b/lint/ksh.sh @@ -1,4 +1,3 @@ -#!/bin/sh find ksh \ -type f -name '*.sh' -exec shellcheck -e SC1090 -s sh -- {} + -o \ -type f -exec shellcheck -e SC1090 -s ksh -- {} + diff --git a/lint/sh b/lint/sh.sh index 18f2f551..632585bf 100755..100644 --- a/lint/sh +++ b/lint/sh.sh @@ -1,2 +1 @@ -#!/bin/sh find sh -type f -print -exec shellcheck -e SC1090 -s sh -- {} + diff --git a/lint/urxvt b/lint/urxvt.sh index 9fd6193d..507034be 100755..100644 --- a/lint/urxvt +++ b/lint/urxvt.sh @@ -1,2 +1 @@ -#!/bin/sh find urxvt/ext -type f ! -name '*.pl' -print -exec perlcritic --brutal -- {} \; diff --git a/lint/yash b/lint/yash.sh index 1397f9f1..d783e077 100755..100644 --- a/lint/yash +++ b/lint/yash.sh @@ -1,2 +1 @@ -#!/bin/sh find yash -type f -print -exec shellcheck -e SC1090 -s sh -- {} + diff --git a/sh/shrc.d/ls.sh b/sh/shrc.d/ls.sh index 0fc6923a..05e7a06c 100644 --- a/sh/shrc.d/ls.sh +++ b/sh/shrc.d/ls.sh @@ -14,8 +14,10 @@ ls() { # -F to show trailing indicators of the filetype # -q to replace control chars with '?' - # -x to format entries across, not down - set -- -Fqx "$@" + set -- -Fq "$@" + + # If output is to a terminal, add -x to format entries across, not down + [ -t 1 ] && set -- -x "$@" # Add --block-size=K to always show the filesize in kibibytes [ -e "$HOME"/.cache/ls/block-size ] && diff --git a/vim/bundle/html5 b/vim/bundle/html5 -Subproject 0a19c5aaf985e064b2cfc30a348a235ba91b257 +Subproject fcbe2d3eaf3ac1438da122e65badbf410d7990e diff --git a/vim/bundle/unimpaired b/vim/bundle/unimpaired -Subproject 11dc568dbfd7a56866a4354c737515769f08e9f +Subproject e939771979393c502e2331fc7d44a963efd7bb4 |