summaryrefslogtreecommitdiffstats
path: root/src/shell_bash.rs
diff options
context:
space:
mode:
authorKevin Turner <83819+keturn@users.noreply.github.com>2019-12-07 13:24:13 -0800
committerGitHub <noreply@github.com>2019-12-07 13:24:13 -0800
commit7ab3cf11f770609d7830b8e56814af0a09d22655 (patch)
tree7aada0293d822082fce9a348f43050b7aa52abaf /src/shell_bash.rs
parent9a897cc842bc696f5641eba8fcd593a7ed90b43a (diff)
bash: replace `cat` invocation with built-in
In bash and zsh, `$(<f)` expands to the contents of the file `f` without needing to invoke a subprocess.
Diffstat (limited to 'src/shell_bash.rs')
-rw-r--r--src/shell_bash.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/shell_bash.rs b/src/shell_bash.rs
index ee4c173..5b3d7cc 100644
--- a/src/shell_bash.rs
+++ b/src/shell_bash.rs
@@ -33,7 +33,7 @@ function br {
if [ "$code" != 0 ]; then
return "$code"
fi
- d=$(cat "$f")
+ d=$(<"$f")
rm -f "$f"
eval "$d"
}