From 6246e75d814dbcd7e56e59ca0efb210e017ea2f3 Mon Sep 17 00:00:00 2001 From: "Andrew R. M" Date: Wed, 10 Apr 2024 16:46:42 +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"