summaryrefslogtreecommitdiff
path: root/bin/vcat
diff options
context:
space:
mode:
authorMarc Vertes <mvertes@free.fr>2022-08-26 20:05:54 +0200
committerMarc Vertes <mvertes@free.fr>2022-08-26 20:05:54 +0200
commit68c376b472b62b72487e8b4ec93a93453e0382c1 (patch)
treec5cbdf1bf38b09840d9f942993c805118526e03a /bin/vcat
parent5e90fa775e4c654d5383e7a14876dde51ee94913 (diff)
update
Diffstat (limited to 'bin/vcat')
-rwxr-xr-xbin/vcat8
1 files changed, 8 insertions, 0 deletions
diff --git a/bin/vcat b/bin/vcat
new file mode 100755
index 0000000..7c162d4
--- /dev/null
+++ b/bin/vcat
@@ -0,0 +1,8 @@
+#!/bin/sh
+
+# Use vim to cat a file.
+# Useful if file is vim-encrypted (password silently expected).
+
+trap "stty '$(stty -g)'" EXIT
+stty -echo
+vim -es '+%p' '+:q!' "$1"