mirror of https://github.com/ericonr/dotfiles.git
Add a shell script generator, set EDITOR in fish config.
This commit is contained in:
parent
20cf27f867
commit
4e8f2a0941
|
@ -8,6 +8,7 @@
|
|||
# fish config related to text editing
|
||||
|
||||
set -x VISUAL nvim
|
||||
set -x EDITOR nvim
|
||||
|
||||
alias clem='emacsclient -n'
|
||||
|
||||
|
|
|
@ -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 '+$'
|
Loading…
Reference in New Issue