From 4ed509fee6c31b5a2f93d19d5c7dd2627400ab8e Mon Sep 17 00:00:00 2001 From: "Andrew R. M" Date: Fri, 4 Apr 2025 17:42:35 +0000 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"