aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2017-03-29 20:04:42 +1300
committerTom Ryder <tom@sanctum.geek.nz>2017-03-29 20:04:42 +1300
commit04988a32bf5de10d25f0d421e0504e6d715f54af (patch)
treecf337641db2e07a49d618c947c210d7818a528f0
parentRemove SC2030 ignore for path logic (diff)
downloaddotfiles-04988a32bf5de10d25f0d421e0504e6d715f54af.tar.gz
dotfiles-04988a32bf5de10d25f0d421e0504e6d715f54af.zip
Use awk for "get first word"
A little clearer than the sed, if longer
-rwxr-xr-xbin/exm2
1 files changed, 1 insertions, 1 deletions
diff --git a/bin/exm b/bin/exm
index 3f4b4c1b..f1afa17a 100755
--- a/bin/exm
+++ b/bin/exm
@@ -1,7 +1,7 @@
#!/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.