diff options
author | Case Duckworth | 2022-04-13 17:09:05 -0500 |
---|---|---|
committer | Case Duckworth | 2022-04-13 17:09:05 -0500 |
commit | 90182069d2aa62062161305b111ec868c42059e9 (patch) | |
tree | 4d0e96bb86d8c18773488a4c9d64c965900cfbb5 | |
parent | Add functions (diff) | |
download | etc-90182069d2aa62062161305b111ec868c42059e9.tar.gz etc-90182069d2aa62062161305b111ec868c42059e9.zip |
Emacs stuff
-rw-r--r-- | bash/aliases.bash | 3 | ||||
-rw-r--r-- | bash/bashrc | 1 | ||||
-rw-r--r-- | bash/vterm-emacs.bash | 23 |
3 files changed, 27 insertions, 0 deletions
diff --git a/bash/aliases.bash b/bash/aliases.bash index f2d6776..03361fa 100644 --- a/bash/aliases.bash +++ b/bash/aliases.bash | |||
@@ -24,3 +24,6 @@ alias lake='make PREFIX=~/usr' | |||
24 | 24 | ||
25 | # bash meta | 25 | # bash meta |
26 | alias rebash='source ~/.bash_profile' | 26 | alias rebash='source ~/.bash_profile' |
27 | |||
28 | # Debugging | ||
29 | alias emacs_goddamnit='pushd ~/.emacs.d;emacs --debug-init;popd' | ||
diff --git a/bash/bashrc b/bash/bashrc index 854fe7e..a1bfade 100644 --- a/bash/bashrc +++ b/bash/bashrc | |||
@@ -10,6 +10,7 @@ BASH_SOURCE_FIRST=( | |||
10 | 10 | ||
11 | BASH_SOURCE_LAST=( | 11 | BASH_SOURCE_LAST=( |
12 | blesh | 12 | blesh |
13 | vterm-emacs | ||
13 | ) | 14 | ) |
14 | 15 | ||
15 | for f in "${BASH_SOURCE_FIRST[@]}"; do | 16 | for f in "${BASH_SOURCE_FIRST[@]}"; do |
diff --git a/bash/vterm-emacs.bash b/bash/vterm-emacs.bash new file mode 100644 index 0000000..88d3e09 --- /dev/null +++ b/bash/vterm-emacs.bash | |||
@@ -0,0 +1,23 @@ | |||
1 | # shell-side configuration for Emacs vterm module | ||
2 | # https://github.com/akermu/emacs-libvterm#shell-side-configuration | ||
3 | # Make sure this is the last file loaded by ~/.bashrc! | ||
4 | |||
5 | # Load the requisite code from the vterm install directory | ||
6 | if [[ "$INSIDE_EMACS" = 'vterm' ]] \ | ||
7 | && [[ -n ${EMACS_VTERM_PATH} ]] \ | ||
8 | && [[ -f ${EMACS_VTERM_PATH}/etc/emacs-vterm-bash.sh ]]; then | ||
9 | source ${EMACS_VTERM_PATH}/etc/emacs-vterm-bash.sh | ||
10 | fi | ||
11 | |||
12 | # Extra commands for `vterm-eval-cmds' | ||
13 | |||
14 | find_file() { | ||
15 | vterm_cmd find-file "$(realpath "${@:-.}")" | ||
16 | } | ||
17 | |||
18 | say() { | ||
19 | vterm_cmd message "%s" "$*" | ||
20 | } | ||
21 | |||
22 | |||
23 | |||