From fd08d4ed13ee822a72f03080026bd30d94f9ba12 Mon Sep 17 00:00:00 2001 From: "Andrew R. M" Date: Sat, 5 Apr 2025 16:37:09 -0400 Subject: [PATCH] Alias cat to always add a newline Sometimes if a file doesn't have a newline cat will not do one, causing prompt strangeness --- bash/.functions | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/bash/.functions b/bash/.functions index d05a8fa..41c5043 100644 --- a/bash/.functions +++ b/bash/.functions @@ -15,3 +15,9 @@ maths() { bc -l <<< "scale=2; $*" } + +cat_with_newline() +{ + cat "$@" && echo +} +alias cat="cat_with_newline"