diff options
author | Kevin Turner <83819+keturn@users.noreply.github.com> | 2019-12-07 13:24:13 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-12-07 13:24:13 -0800 |
commit | 7ab3cf11f770609d7830b8e56814af0a09d22655 (patch) | |
tree | 7aada0293d822082fce9a348f43050b7aa52abaf /src/shell_bash.rs | |
parent | 9a897cc842bc696f5641eba8fcd593a7ed90b43a (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.rs | 2 |
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" } |