diff --git a/fish/.config/fish/conf.d/text_editor.fish b/fish/.config/fish/conf.d/text_editor.fish index 8243343..4b10495 100644 --- a/fish/.config/fish/conf.d/text_editor.fish +++ b/fish/.config/fish/conf.d/text_editor.fish @@ -8,6 +8,7 @@ # fish config related to text editing set -x VISUAL nvim +set -x EDITOR nvim alias clem='emacsclient -n' diff --git a/script/.local/bin/mkscript b/script/.local/bin/mkscript new file mode 100755 index 0000000..ddde08e --- /dev/null +++ b/script/.local/bin/mkscript @@ -0,0 +1,24 @@ +#!/usr/bin/env bash + +# script to automate generation of executable shell scripts + +FILE=$1 +SHELL=$2 + +if [ -z $FILE ] +then + echo "No file name specified." + exit +fi + +if [ -e $FILE ] +then + echo "File already exists." + exit +fi + +printf "#!/usr/bin/env ${SHELL:-bash}\n\n\n" > $FILE + +touch $FILE +chmod +x $FILE +exec ${EDITOR:-nvim} $FILE '+$'