diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2016-08-18 11:09:47 +1200 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2016-08-18 11:09:47 +1200 |
commit | 00c3c1f3b1221e5dc2d57b53daef7eb1b0f09858 (patch) | |
tree | f9dc59e014ee712aa2fd84b08ce7710493c3e26e /bin | |
parent | Fix up some command builtin calls (diff) | |
download | dotfiles-00c3c1f3b1221e5dc2d57b53daef7eb1b0f09858.tar.gz dotfiles-00c3c1f3b1221e5dc2d57b53daef7eb1b0f09858.zip |
Arrange EDITOR/VISUAL in a more typical way
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/eds | 4 | ||||
-rwxr-xr-x | bin/td | 4 |
2 files changed, 4 insertions, 4 deletions
@@ -43,8 +43,8 @@ for file in "${files[@]}" ; do creations[${#creations[@]}]=$file done -# Run the editor; if EDITOR isn't set, use vi(1) -"${EDITOR:-vi}" "${opts[@]}" -- "${files[@]}" +# Run the editor; if EDITOR isn't set, use ed(1) +"${VISUAL:-"${EDITOR:-ed}"}" "${opts[@]}" -- "${files[@]}" # Make any created scripts executable if they now appear to be files for creation in "${creations[@]}" ; do @@ -21,8 +21,8 @@ isgr || git init || exit # If the to-do file doesn't exist yet, create it [ -e "$file" ] || touch -- "$file" || exit -# Launch $VISUAL (or $EDITOR (or vi(1))) to edit the appropriate to-do file -"${VISUAL:-"${EDITOR:-vi}"}" "$file" +# Launch an appropriate editor to edit that file +"${VISUAL:-"${EDITOR:-ed}"}" "$file" # Add the file to the changeset git add -- "$file" |