diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2017-03-10 10:49:37 +1300 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2017-03-10 10:49:37 +1300 |
commit | 4c53b9d6552954938cfdc46ee4cc2a5b524a9f60 (patch) | |
tree | 17573ee81f2cae7ea13c4ea4b2e7a12eb1bcc9bf | |
parent | Merge branch 'master' into port/bsd/freebsd (diff) | |
parent | Correct two manual references (diff) | |
download | dotfiles-4c53b9d6552954938cfdc46ee4cc2a5b524a9f60.tar.gz dotfiles-4c53b9d6552954938cfdc46ee4cc2a5b524a9f60.zip |
Merge branch 'master' into port/bsd/freebsd
-rw-r--r-- | IDEAS.markdown | 1 | ||||
-rw-r--r-- | ISSUES.markdown | 4 | ||||
-rw-r--r-- | Makefile | 159 | ||||
-rw-r--r-- | README.markdown | 23 | ||||
-rw-r--r-- | X/sxhkdrc | 44 | ||||
-rw-r--r-- | X/xbindkeysrc | 44 | ||||
-rw-r--r-- | X/xinitrc.d/sxhkd.sh | 3 | ||||
-rw-r--r-- | X/xinitrc.d/xbindkeys.sh | 3 | ||||
-rw-r--r-- | bash/bash_completion.d/git.bash | 23 | ||||
-rw-r--r-- | man/man1/br.1df | 3 | ||||
-rw-r--r-- | man/man1/wro.1df | 6 | ||||
-rw-r--r-- | mutt/muttrc | 3 | ||||
-rw-r--r-- | sh/profile.d/editor.sh | 8 | ||||
-rw-r--r-- | sh/profile.d/plenv.sh | 5 | ||||
-rw-r--r-- | sh/profile.d/visual.sh | 8 | ||||
-rw-r--r-- | sh/shrc.d/plenv.sh | 17 | ||||
-rw-r--r-- | sh/shrc.d/vim.sh | 13 | ||||
m--------- | vim/bundle/html5 | 0 | ||||
-rw-r--r-- | zsh/zshrc | 2 |
19 files changed, 189 insertions, 180 deletions
diff --git a/IDEAS.markdown b/IDEAS.markdown index d787947d..67283ce2 100644 --- a/IDEAS.markdown +++ b/IDEAS.markdown @@ -3,7 +3,6 @@ Ideas * I can probably share my psql() completions/shortcuts after sanitizing them a bit -* sxhkd(1) might be nicer than xbindkeys; it's in Debian Testing now * Wouldn't be too hard to add some HTTP BASIC auth to ix(1df) to make pastes manageable * Have eds(1df) accept stdin with the "starting content" for the script diff --git a/ISSUES.markdown b/ISSUES.markdown index 42e1524e..9a2877d3 100644 --- a/ISSUES.markdown +++ b/ISSUES.markdown @@ -18,8 +18,8 @@ Known issues * I can't find a clean way of detecting a restricted shell for ksh instances to prevent trying to load anything fancy (works for Bash) * Zsh, either! $options[restricted] is "off" within the startup file -* Git completion for "add" is error-prone; probably best just to let it add - plain files * 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`). @@ -1,4 +1,4 @@ -.PHONY : all \ +.PHONY: all \ clean \ distclean \ install \ @@ -61,10 +61,10 @@ .SUFFIXES: .awk .bash .pl .sed -NAME := Tom Ryder -EMAIL := tom@sanctum.geek.nz -KEY := 0xC14286EA77BB8872 -SENDMAIL := msmtp +NAME = Tom Ryder +EMAIL = tom@sanctum.geek.nz +KEY = 0xC14286EA77BB8872 +SENDMAIL = msmtp BINS = bin/brnl \ bin/csmw \ @@ -105,9 +105,9 @@ GAMES = games/acq \ games/strik \ games/zs -all : $(BINS) git/gitconfig gnupg/gpg.conf +all: $(BINS) git/gitconfig gnupg/gpg.conf -clean distclean : +clean distclean: rm -f \ $(BINS) \ $(GAMES) \ @@ -117,7 +117,7 @@ clean distclean : tmux/tmux.conf \ urxvt/ext/select -git/gitconfig : git/gitconfig.m4 +git/gitconfig: git/gitconfig.m4 m4 \ -D DOTFILES_NAME="$(NAME)" \ -D DOTFILES_EMAIL="$(EMAIL)" \ @@ -125,44 +125,44 @@ git/gitconfig : git/gitconfig.m4 -D DOTFILES_SENDMAIL="$(SENDMAIL)" \ git/gitconfig.m4 > git/gitconfig -KEYSERVER := hkps://hkps.pool.sks-keyservers.net +KEYSERVER = hkps://hkps.pool.sks-keyservers.net -gnupg/gpg.conf : gnupg/gpg.conf.m4 +gnupg/gpg.conf: gnupg/gpg.conf.m4 m4 \ -D DOTFILES_HOME="$(HOME)" \ -D DOTFILES_KEYSERVER="$(KEYSERVER)" \ gnupg/gpg.conf.m4 > gnupg/gpg.conf -man/man7/dotfiles.7df : README.markdown man/man7/dotfiles.7df.header +man/man7/dotfiles.7df: README.markdown man/man7/dotfiles.7df.header cat man/man7/dotfiles.7df.header README.markdown | \ pandoc -sS -t man -o "$@" -MAILDIR := $(HOME)/Mail +MAILDIR = $(HOME)/Mail -TMUX_BG := colour237 -TMUX_FG := colour248 +TMUX_BG = colour237 +TMUX_FG = colour248 -tmux/tmux.conf : tmux/tmux.conf.m4 +tmux/tmux.conf: tmux/tmux.conf.m4 m4 -D TMUX_BG="$(TMUX_BG)" -D TMUX_FG="$(TMUX_FG)" \ tmux/tmux.conf.m4 > tmux/tmux.conf -.awk : +.awk: bin/shb "$<" awk -f > "$@" chmod +x "$@" -.bash : +.bash: bin/shb "$<" bash > "$@" chmod +x "$@" -.pl : +.pl: bin/shb "$<" perl > "$@" chmod +x "$@" -.sed : +.sed: bin/shb "$<" sed -f > "$@" chmod +x "$@" -install : install-bash \ +install: install-bash \ install-bash-completion \ install-bin \ install-curl \ @@ -174,12 +174,12 @@ install : install-bash \ install-sh \ install-vim -install-abook : +install-abook: mkdir -p -- \ "$(HOME)"/.abook cp -p -- abook/abookrc "$(HOME)"/.abook -install-bash : check-bash install-sh +install-bash: check-bash install-sh mkdir -p -- \ "$(HOME)"/.config \ "$(HOME)"/.bashrc.d @@ -188,59 +188,59 @@ install-bash : check-bash install-sh cp -p -- bash/bash_profile "$(HOME)"/.bash_profile cp -p -- bash/bash_logout "$(HOME)"/.bash_logout -install-bash-completion : install-bash +install-bash-completion: install-bash mkdir -p -- "$(HOME)"/.bash_completion.d cp -p -- bash/bash_completion "$(HOME)"/.config/bash_completion cp -p -- bash/bash_completion.d/* "$(HOME)"/.bash_completion.d -install-bin : $(BINS) install-bin-man +install-bin: $(BINS) install-bin-man mkdir -p -- "$(HOME)"/.local/bin for name in bin/* ; do \ [ -x "$$name" ] || continue ; \ cp -p -- "$$name" "$(HOME)"/.local/bin ; \ done -install-bin-man : +install-bin-man: mkdir -p -- \ "$(HOME)"/.local/share/man/man1 \ "$(HOME)"/.local/share/man/man8 cp -p -- man/man1/*.1df "$(HOME)"/.local/share/man/man1 cp -p -- man/man8/*.8df "$(HOME)"/.local/share/man/man8 -install-curl : +install-curl: cp -p -- curl/curlrc "$(HOME)"/.curlrc -install-dotfiles-man : man/man7/dotfiles.7df +install-dotfiles-man: man/man7/dotfiles.7df mkdir -p -- "$(HOME)"/.local/share/man/man7 cp -p -- man/man7/*.7df "$(HOME)"/.local/share/man/man7 -install-dunst : install-x +install-dunst: install-x mkdir -p -- "$(HOME)"/.config/dunst cp -p -- dunst/dunstrc "$(HOME)"/.config/dunst -install-ex : +install-ex: cp -p -- ex/exrc "$(HOME)"/.exrc -install-finger : +install-finger: cp -p -- finger/plan "$(HOME)"/.plan cp -p -- finger/project "$(HOME)"/.project cp -p -- finger/pgpkey "$(HOME)"/.pgpkey -install-games : $(GAMES) install-games-man +install-games: $(GAMES) install-games-man mkdir -p -- "$(HOME)"/.local/games for name in games/* ; do \ [ -x "$$name" ] || continue ; \ cp -p -- "$$name" "$(HOME)"/.local/games ; \ done -install-games-man : +install-games-man: mkdir -p -- "$(HOME)"/.local/share/man/man6 cp -p -- man/man6/*.6df "$(HOME)"/.local/share/man/man6 -install-git : git/gitconfig +install-git: git/gitconfig cp -p -- git/gitconfig "$(HOME)"/.gitconfig -install-gnupg : gnupg/gpg.conf +install-gnupg: gnupg/gpg.conf mkdir -m 0700 -p -- \ "$(HOME)"/.gnupg \ "$(HOME)"/.gnupg/sks-keyservers.net @@ -248,41 +248,41 @@ install-gnupg : gnupg/gpg.conf cp -p -- gnupg/sks-keyservers.net/* \ "$(HOME)"/.gnupg/sks-keyservers.net -install-gtk : +install-gtk: mkdir -p -- \ "$(HOME)"/.config/gtkrc-3.0 cp -p -- gtk/gtkrc-2.0 "$(HOME)"/.gtkrc-2.0 cp -p -- gtk/gtkrc-3.0/settings.ini "$(HOME)"/.config/gtkrc-3.0 -install-i3 : install-x +install-i3: install-x mkdir -p -- "$(HOME)"/.i3 cp -p -- i3/* "$(HOME)"/.i3 -install-less : +install-less: cp -p -- less/lesskey "$(HOME)"/.lesskey command -v lesskey && lesskey -install-mutt : +install-mutt: mkdir -p -- \ "$(HOME)"/.muttrc.d \ "$(HOME)"/.cache/mutt cp -p -- mutt/muttrc "$(HOME)"/.muttrc cp -p -- mutt/muttrc.d/src "$(HOME)"/.muttrc.d -install-ncmcpp : +install-ncmcpp: mkdir -p -- "$(HOME)"/.ncmpcpp cp -p -- ncmpcpp/config "$(HOME)"/.ncmpcpp/config -install-newsbeuter : +install-newsbeuter: mkdir -p -- \ "$(HOME)"/.config/newsbeuter \ "$(HOME)"/.local/share/newsbeuter cp -p -- newsbeuter/config "$(HOME)"/.config/newsbeuter/config -install-mysql : +install-mysql: cp -p -- mysql/my.cnf "$(HOME)"/.my.cnf -install-ksh : check-ksh install-sh +install-ksh: check-ksh install-sh mkdir -p -- \ "$(HOME)"/.shrc.d \ "$(HOME)"/.kshrc.d @@ -290,19 +290,19 @@ install-ksh : check-ksh install-sh cp -p -- ksh/kshrc "$(HOME)"/.kshrc cp -p -- ksh/kshrc.d/* "$(HOME)"/.kshrc.d -install-perlcritic : +install-perlcritic: cp -p -- perlcritic/perlcriticrc "$(HOME)"/.perlcriticrc -install-perltidy : +install-perltidy: cp -p -- perltidy/perltidyrc "$(HOME)"/.perltidyrc -install-psql : +install-psql: cp -p -- psql/psqlrc "$(HOME)"/.psqlrc -install-readline : +install-readline: cp -p -- readline/inputrc "$(HOME)"/.inputrc -install-sh : check-sh +install-sh: check-sh mkdir -p -- \ "$(HOME)"/.profile.d \ "$(HOME)"/.shrc.d @@ -312,19 +312,19 @@ install-sh : check-sh cp -p -- sh/shrc "$(HOME)"/.shrc cp -p -- sh/shrc.d/* "$(HOME)"/.shrc.d -install-subversion : +install-subversion: mkdir -p -- "$(HOME)"/.subversion cp -p -- subversion/config "$(HOME)"/.subversion/config -install-terminfo : +install-terminfo: for info in terminfo/*.info ; do \ tic -- "$$info" ; \ done -install-tmux : tmux/tmux.conf 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 check-urxvt mkdir -p -- "$(HOME)"/.urxvt/ext for name in urxvt/ext/* ; do \ case $$name in \ @@ -333,51 +333,52 @@ install-urxvt : urxvt/ext/select check-urxvt esac \ done -install-vim : install-vim-config \ +install-vim: install-vim-config \ install-vim-plugins \ install-vim-pathogen -install-gvim : install-vim \ +install-gvim: install-vim \ install-gvim-config -install-vim-config : +install-vim-config: cp -p -- vim/vimrc "$(HOME)"/.vimrc -install-gvim-config : +install-gvim-config: cp -p -- vim/gvimrc "$(HOME)"/.gvimrc -install-vim-plugins : install-vim-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"' _ {} \; -install-vim-pathogen : install-vim-plugins +install-vim-pathogen: install-vim-plugins mkdir -p -- "$(HOME)"/.vim/autoload rm -f -- "$(HOME)"/.vim/autoload/pathogen.vim ln -s -- ../bundle/pathogen/autoload/pathogen.vim \ "$(HOME)"/.vim/autoload/pathogen.vim -install-x : +install-x: mkdir -p -- \ "$(HOME)"/.config \ + "$(HOME)"/.config/sxhkdrc \ "$(HOME)"/.xinitrc.d \ "$(HOME)"/.Xresources.d cp -p -- X/redshift.conf "$(HOME)"/.config/redshift.conf - cp -p -- X/xbindkeysrc "$(HOME)"/.xbindkeysrc + cp -p -- X/sxhkdrc "$(HOME)"/.config/sxhkd/sxhkdrc cp -p -- X/xinitrc "$(HOME)"/.xinitrc cp -p -- X/xinitrc.d/* "$(HOME)"/.xinitrc.d cp -p -- X/Xresources "$(HOME)"/.Xresources cp -p -- X/Xresources.d/* "$(HOME)"/.Xresources.d -install-yash : check-yash install-sh +install-yash: check-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: check-zsh install-sh mkdir -p -- \ "$(HOME)"/.profile.d \ "$(HOME)"/.zshrc.d @@ -386,41 +387,41 @@ install-zsh : check-zsh install-sh cp -p -- zsh/zshrc "$(HOME)"/.zshrc cp -p -- zsh/zshrc.d/* "$(HOME)"/.zshrc.d -check : check-bash \ +check: check-bash \ check-bin \ check-games \ check-man \ check-sh \ check-urxvt -check-bash : +check-bash: check/bash -check-bin : $(BINS) +check-bin: $(BINS) check/bin -check-games : $(GAMES) +check-games: $(GAMES) check/games -check-man : +check-man: check/man -check-ksh : +check-ksh: check/ksh -check-sh : +check-sh: check/sh -check-urxvt : +check-urxvt: check/urxvt -check-yash : +check-yash: check/yash -check-zsh : +check-zsh: check/zsh -lint : check \ +lint: check \ lint-bash \ lint-bin \ lint-games \ @@ -429,23 +430,23 @@ lint : check \ lint-urxvt \ lint-yash -lint-bash : +lint-bash: lint/bash -lint-bin : $(BINS) +lint-bin: $(BINS) lint/bin -lint-games : $(GAMES) +lint-games: $(GAMES) lint/games -lint-ksh : +lint-ksh: lint/ksh -lint-sh : +lint-sh: lint/sh -lint-urxvt : +lint-urxvt: lint/urxvt -lint-yash : +lint-yash: lint/yash diff --git a/README.markdown b/README.markdown index cd91dd8b..4cd4820c 100644 --- a/README.markdown +++ b/README.markdown @@ -27,10 +27,23 @@ directory so you can explore: $ make install HOME="$tmpdir" $ env -i HOME="$tmpdir" TERM="$TERM" bash -l -The default target will install the core terminal-only files: cURL, Git, GnuPG, -vi/Vim, shell scripts and functions, and shell setup files. The remaining -dotfiles can be installed with the other targets. Take a look at the `Makefile` -to see what's available. +The default `install` target will install these targets and all their +dependencies: + +* `install-bash` +* `install-bin` +* `install-bin-man` +* `install-curl` +* `install-ex` +* `install-git` +* `install-gnupg` +* `install-less` +* `install-readline` +* `install-sh` +* `install-vim` + +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. Tools ----- @@ -204,8 +217,6 @@ in `sh/shrc.d` to be loaded by any POSIX interactive shell. Those include: preserved; I hate having `root`-owned files in my home directory. * `tree()` colorizes GNU `tree(1)` output if possible (without having `LS_COLORS` set). -* `vim()` defines three functions to always use `vim(1)` as my `ex(1)`, - `vi(1)` and `view(1)` implementation if it's available. * `x()` is a one-key shortcut for `exec startx`. There are a few other little tricks defined for other shells providing diff --git a/X/sxhkdrc b/X/sxhkdrc new file mode 100644 index 00000000..5a75f1df --- /dev/null +++ b/X/sxhkdrc @@ -0,0 +1,44 @@ +super + Return + urxvtcd + +super + control + Return + urxvtcd -e sh + +super + shift + Return + urxvtcd -e ksh + +super + alt + Return + urxvtcd -e zsh + +super + b + br + +super + d + dmenu_run + +super + g + xgoc + +super + i + gimp + +super + m + urxvtcd -e tm + +super + p + dmp + +super + slash + i3lock --color=#000000 --image ~/.i3/lock.png --nofork + +XF86AudioMute + amixer -q sset Master toggle + +XF86AudioRaiseVolume + amixer -q sset Master 5%+ unmute + +XF86AudioLowerVolume + amixer -q sset Master 5%- unmute + +XF86Calculator + urxvtcd -e bcq diff --git a/X/xbindkeysrc b/X/xbindkeysrc deleted file mode 100644 index 16ae5b14..00000000 --- a/X/xbindkeysrc +++ /dev/null @@ -1,44 +0,0 @@ -"exec urxvtcd" - Mod4 + Return - -"exec urxvtcd -e sh" - Mod4 + Control + Return - -"exec urxvtcd -e ksh" - Mod4 + Shift + Return - -"exec urxvtcd -e zsh" - Mod4 + Alt + Return - -"exec br" - Mod4 + b - -"exec dmenu_run" - Mod4 + d - -"exec xgoc" - Mod4 + g - -"exec gimp" - Mod4 + i - -"exec urxvtcd -e tm" - Mod4 + m - -"exec dmp" - Mod4 + p - -"exec i3lock --color=#000000 --image ~/.i3/lock.png --nofork" - Mod4 + slash - -"exec amixer -q sset Master toggle" - XF86AudioMute - -"exec amixer -q sset Master 5%+ unmute" - XF86AudioRaiseVolume - -"exec amixer -q sset Master 5%- unmute" - XF86AudioLowerVolume - -"exec urxvtcd -e bcq" - XF86Calculator diff --git a/X/xinitrc.d/sxhkd.sh b/X/xinitrc.d/sxhkd.sh new file mode 100644 index 00000000..132d8f8a --- /dev/null +++ b/X/xinitrc.d/sxhkd.sh @@ -0,0 +1,3 @@ +# Start sxhkd(1) +command -v sxhkd >/dev/null 2>&1 || return +sxhkd & diff --git a/X/xinitrc.d/xbindkeys.sh b/X/xinitrc.d/xbindkeys.sh deleted file mode 100644 index b76aebdd..00000000 --- a/X/xinitrc.d/xbindkeys.sh +++ /dev/null @@ -1,3 +0,0 @@ -# Start xbindkeys(1) -command -v xbindkeys >/dev/null 2>&1 || return -(cd -- "$HOME" && xbindkeys -n) & diff --git a/bash/bash_completion.d/git.bash b/bash/bash_completion.d/git.bash index 5cf42ed3..2bee169a 100644 --- a/bash/bash_completion.d/git.bash +++ b/bash/bash_completion.d/git.bash @@ -69,23 +69,6 @@ _git() { done return ;; - - # Untracked files - untracked_files) - local file - while IFS= read -rd '' file ; do - [[ -n $file ]] || continue - COMPREPLY[${#COMPREPLY[@]}]=$file - done < <(git ls-files \ - --directory \ - --exclude-standard \ - --no-empty-directory \ - --others \ - -z \ - -- "${COMP_WORDS[COMP_CWORD]}"'*' \ - 2>/dev/null) - return - ;; esac # Try to find the index of the Git subcommand @@ -117,12 +100,6 @@ _git() { # Test subcommand to choose completions case ${COMP_WORDS[sci]} in - # Complete with untracked, unignored files - add) - "${FUNCNAME[0]}" untracked_files - return - ;; - # Help on real subcommands (not aliases) help) "${FUNCNAME[0]}" subcommands diff --git a/man/man1/br.1df b/man/man1/br.1df index af9645fb..05d662bc 100644 --- a/man/man1/br.1df +++ b/man/man1/br.1df @@ -14,9 +14,6 @@ BROWSER=firefox .B br just execs the program in the $BROWSER environment variable with the given arguments. That's it. -.P -It was written to have a clean way to launch $BROWSER from ~/.xbindkeysrc. It -has no other reason to exist. .SH SEE ALSO bp(1df), xgo(1df), xgoc(1df) .SH AUTHOR diff --git a/man/man1/wro.1df b/man/man1/wro.1df index 350ca448..dc64046b 100644 --- a/man/man1/wro.1df +++ b/man/man1/wro.1df @@ -3,12 +3,16 @@ .B wro \- add a quote header to the standard input .SH SYNOPSIS +$ .B wro -luser@example.com +luser@example.com < file .br +$ .B wro luser@example.com '2017-01-15 9:00am' +.br Text on standard input. +.br ^D .SH DESCRIPTION .B wro diff --git a/mutt/muttrc b/mutt/muttrc index 3a38a7cf..953ab418 100644 --- a/mutt/muttrc +++ b/mutt/muttrc @@ -108,6 +108,9 @@ set crypt_use_gpgme = yes set crypt_use_pka = yes set crypt_verify_sig = yes +# Do decode classic PGP messages, though we'll never write them +set pgp_auto_decode = yes + # Vim-ish bindings bind index gg first-entry bind index G last-entry diff --git a/sh/profile.d/editor.sh b/sh/profile.d/editor.sh index ee0da70b..5d6b249e 100644 --- a/sh/profile.d/editor.sh +++ b/sh/profile.d/editor.sh @@ -1,3 +1,7 @@ -# Set command-line editor -EDITOR=ed +# Set command-line editor; ed if we've got it (!), but ex will do fine +if command -v ed >/dev/null 2>&1 ; then + EDITOR=ed +else + EDITOR=ex +fi export EDITOR diff --git a/sh/profile.d/plenv.sh b/sh/profile.d/plenv.sh new file mode 100644 index 00000000..b2b491e1 --- /dev/null +++ b/sh/profile.d/plenv.sh @@ -0,0 +1,5 @@ +# Add plenv to PATH and MANPATH if it appears to be in use +[ -d "$HOME"/.plenv ] || return +PATH=$HOME/.plenv/shims:$HOME/.plenv/bin:$PATH +MANPATH=$HOME/.plenv/versions/$(perl -e 'print substr($^V,1)')/man:$MANPATH +export MANPATH diff --git a/sh/profile.d/visual.sh b/sh/profile.d/visual.sh index 95eb1d5d..d03da255 100644 --- a/sh/profile.d/visual.sh +++ b/sh/profile.d/visual.sh @@ -1,3 +1,7 @@ -# Set visual editor -VISUAL=vi +# Set visual editor; vim if we've got it, but vi will do fine +if command -v vim >/dev/null 2>&1 ; then + VISUAL=vim +else + VISUAL=vi +fi export VISUAL diff --git a/sh/shrc.d/plenv.sh b/sh/shrc.d/plenv.sh new file mode 100644 index 00000000..6e03618e --- /dev/null +++ b/sh/shrc.d/plenv.sh @@ -0,0 +1,17 @@ +# POSIX-compatible version of the plenv Bash shell wrapper +[ -d "$HOME"/.plenv ] || return +plenv() { + case $1 in + rehash) + shift + eval "$(plenv sh-rehash "$@")" + ;; + shell) + shift + eval "$(plenv sh-shell "$@")" + ;; + *) + command plenv "$@" + ;; + esac +} diff --git a/sh/shrc.d/vim.sh b/sh/shrc.d/vim.sh deleted file mode 100644 index e9174082..00000000 --- a/sh/shrc.d/vim.sh +++ /dev/null @@ -1,13 +0,0 @@ -# If Vim exists on the system, use it instead of ex, vi, and view -command -v vim >/dev/null 2>&1 || return - -# Define functions proper -ex() { - vim -e "$@" -} -vi() { - vim "$@" -} -view() { - vim -R "$@" -} diff --git a/vim/bundle/html5 b/vim/bundle/html5 -Subproject fc64e3d0de438a02dcfbe9d6fc7d73dbf721ce2 +Subproject 3f3484a8788f599a9eb86c363408c5cab66d66b @@ -1,6 +1,6 @@ # Clear away all aliases; we do this here rather than in $ENV because the ksh # family of shells relies on aliases to implement certain POSIX utilities like -# fc(1) and type(1). Ignore output, as older Zsh seems not to implement this +# `fc` and `type`. Ignore output, as older Zsh seems not to implement this # (quelle surprise). unalias -a >/dev/null 2>&1 |