From 1f0ebe4226da78c212e61b1112d08d81e0ed7feb Mon Sep 17 00:00:00 2001 From: Storm Dragon Date: Sat, 13 Apr 2019 08:48:04 -0400 Subject: [PATCH] Improved editor setting, try to use correct values for line wrapping with nano, and skipping headers with both nano and ne. --- fleacollar.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/fleacollar.sh b/fleacollar.sh index 068ddad..5378844 100755 --- a/fleacollar.sh +++ b/fleacollar.sh @@ -191,7 +191,12 @@ initialize_directory() if [ -z "$i" ]; then exit 0 fi - echo "set editor=$i" > "$muttHome/muttrc" + # Try to handle special cases like with ne and nano skipping headers and line wrapping. + case "$i" in + "nano") echo "set editor=$i +7 -r 72" > "$muttHome/muttrc";; + "ne") echo "set editor=$i +7" > "$muttHome/muttrc";; + *) echo "set editor=$i +7" > "$muttHome/muttrc";; + esac echo "set text_flowed=yes" >> "$muttHome/muttrc" # I need to figure out a way to detect and set the language for the next setting. echo "set send_charset=us-ascii:utf-8" >> "$muttHome/muttrc"