Update shell indentation to be bashate compliant
This commit is contained in:
parent
bc1b7a1c35
commit
c1dd2a133a
2 changed files with 5 additions and 13 deletions
|
@ -1300,8 +1300,8 @@ While filename extensions work fine most of the time, I don't like to pre-pend =
|
||||||
:mode (rx (or (seq ".sh" eol)
|
:mode (rx (or (seq ".sh" eol)
|
||||||
"/bin/"))
|
"/bin/"))
|
||||||
:init
|
:init
|
||||||
(setq sh-basic-offset 2
|
(setq sh-basic-offset 4
|
||||||
sh-indentation 2)
|
sh-indentation 4)
|
||||||
:config
|
:config
|
||||||
(ha-auto-insert-file (rx (or (seq ".sh" eol)
|
(ha-auto-insert-file (rx (or (seq ".sh" eol)
|
||||||
"/bin/"))
|
"/bin/"))
|
||||||
|
|
|
@ -214,14 +214,6 @@ Let's begin by defining some variables used for communication between the functi
|
||||||
See =ha-ssh-add-favorite-host= for easily adding to this list.")
|
See =ha-ssh-add-favorite-host= for easily adding to this list.")
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
Also, let's make it easy for me to change my default shell:
|
|
||||||
|
|
||||||
#+begin_src emacs-lisp
|
|
||||||
(defvar ha-shell "bash" ;; Eat works better with Bash/Zsh
|
|
||||||
;; (string-trim (shell-command-to-string "type -p fish"))
|
|
||||||
"The executable to the shell I want to use locally.")
|
|
||||||
#+end_src
|
|
||||||
|
|
||||||
** Terminal Abstractions
|
** Terminal Abstractions
|
||||||
Could I abstract the different ways I start terminals in Emacs? The =ha-ssh-term= starts either a [[VTerm]]
|
Could I abstract the different ways I start terminals in Emacs? The =ha-ssh-term= starts either a [[VTerm]]
|
||||||
or [[Eat]] terminals, depending on what is available. This replaces (wraps) the default [[help:make-term][make-term]].
|
or [[Eat]] terminals, depending on what is available. This replaces (wraps) the default [[help:make-term][make-term]].
|
||||||
|
@ -232,11 +224,11 @@ or [[Eat]] terminals, depending on what is available. This replaces (wraps) the
|
||||||
The PROGRAM, if non-nil, is executed, otherwise, this is `ha-shell'.
|
The PROGRAM, if non-nil, is executed, otherwise, this is `ha-shell'.
|
||||||
STARTFILE is the initial text given to the PROGRAM, and the
|
STARTFILE is the initial text given to the PROGRAM, and the
|
||||||
SWITCHES are the command line options."
|
SWITCHES are the command line options."
|
||||||
(unless program (setq program ha-shell))
|
|
||||||
(cond
|
(cond
|
||||||
((fboundp 'vterm) (progn (vterm name)
|
((fboundp 'vterm) (progn (vterm name)
|
||||||
|
(when program
|
||||||
(vterm-send-string (append program switches))
|
(vterm-send-string (append program switches))
|
||||||
(vterm-send-return)))
|
(vterm-send-return))))
|
||||||
((fboundp 'eat) (progn (switch-to-buffer
|
((fboundp 'eat) (progn (switch-to-buffer
|
||||||
(apply 'eat-make (append (list name program startfile)
|
(apply 'eat-make (append (list name program startfile)
|
||||||
switches)))
|
switches)))
|
||||||
|
|
Loading…
Reference in a new issue