Compare commits
No commits in common. "389b0142a3bbdbcb47297a9d85e9f7d5bbfe6b10" and "7df30b6e674ed5d0fd2da4a252e311d8f69def74" have entirely different histories.
389b0142a3
...
7df30b6e67
4 changed files with 7 additions and 107 deletions
|
|
@ -31,11 +31,7 @@ if test -d /home/linuxbrew/.linuxbrew
|
||||||
eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv fish)"
|
eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv fish)"
|
||||||
end
|
end
|
||||||
|
|
||||||
if [ -n "$EAT_SHELL_INTEGRATION_DIR" ]
|
if [ -n "$INSIDE_EMACS" ]
|
||||||
|
|
||||||
source ~/.config/fish/eat.fish
|
|
||||||
|
|
||||||
else if [ -n "$INSIDE_EMACS" ]
|
|
||||||
# This is here to make emacs and ansi-term work properly; I'm not *quite*
|
# This is here to make emacs and ansi-term work properly; I'm not *quite*
|
||||||
# sure what it does but it's probably cool.
|
# sure what it does but it's probably cool.
|
||||||
function fish_title
|
function fish_title
|
||||||
|
|
|
||||||
|
|
@ -1,95 +0,0 @@
|
||||||
# integration/fish --- Fish integration
|
|
||||||
|
|
||||||
# Copyright (C) 2022-2024 Akib Azmain Turja.
|
|
||||||
|
|
||||||
# This file is not part of GNU Emacs.
|
|
||||||
|
|
||||||
# This file is free software; you can redistribute it and/or modify
|
|
||||||
# it under the terms of the GNU General Public License as published by
|
|
||||||
# the Free Software Foundation; either version 3, or (at your option)
|
|
||||||
# any later version.
|
|
||||||
|
|
||||||
# This program is distributed in the hope that it will be useful,
|
|
||||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
# GNU General Public License for more details.
|
|
||||||
|
|
||||||
# For a full copy of the GNU General Public License
|
|
||||||
# see <https://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
|
|
||||||
# Features missing compared to the bash/zsh integrations:
|
|
||||||
# - Fish history import into Emacs.
|
|
||||||
# - The PS2 prompt support (line continuation).
|
|
||||||
|
|
||||||
function eat_enable_integration
|
|
||||||
set -g __eat_integration_enabled yes
|
|
||||||
|
|
||||||
function __eat_chpwd --on-variable PWD
|
|
||||||
# Send the current working directory, for directory tracking.
|
|
||||||
printf '\e]51;e;A;%s;%s\e\\\\' \
|
|
||||||
"$(echo -n -- $hostname | base64)" \
|
|
||||||
"$(echo -n -- $PWD | base64)"
|
|
||||||
end
|
|
||||||
|
|
||||||
function __eat_preexec --on-event fish_preexec
|
|
||||||
set current_command $argv[1]
|
|
||||||
# Send current command.
|
|
||||||
printf '\e]51;e;F;%s\e\\\\' \
|
|
||||||
"$(echo -n -- $current_command | base64)"
|
|
||||||
|
|
||||||
# Send pre-exec sequence.
|
|
||||||
printf '\e]51;e;G\e\\\\'
|
|
||||||
|
|
||||||
# Update title to include the command running.
|
|
||||||
# "${PWD/$HOME/'~'}" converts "/home/akib/foo/" to "~/foo/".
|
|
||||||
# The next one is substituted with '$', or '#' if we're "root".
|
|
||||||
printf '\e]2;%s@%s:%s%s\e\\\\' "$USER" "$hostname" \
|
|
||||||
"$(string replace $HOME '~' $PWD)" \
|
|
||||||
"$(fish_is_root_user && echo '#' || echo '$')" \
|
|
||||||
"$current_command"
|
|
||||||
end
|
|
||||||
|
|
||||||
function __eat_postexec --on-event fish_postexec
|
|
||||||
set exit_status $status
|
|
||||||
# Send exit status.
|
|
||||||
printf '\e]51;e;H;%i\e\\\\' $exit_status
|
|
||||||
|
|
||||||
# Inform that a new prompt is going to be printed.
|
|
||||||
printf '\e]51;e;J\e\\\\'
|
|
||||||
|
|
||||||
# Update title.
|
|
||||||
# "${PWD/$HOME/'~'}" converts "/home/akib/org/" to "~/org/".
|
|
||||||
# The next one is substituted with '$', or '#' if we're "root".
|
|
||||||
printf '\e]2;%s@%s:%s%s\e\\\\' "$USER" "$hostname" \
|
|
||||||
"$(string replace $HOME '~' $PWD)" \
|
|
||||||
"$(fish_is_root_user && echo '#' || echo '$')"
|
|
||||||
end
|
|
||||||
|
|
||||||
functions --copy fish_prompt __eat_original_fish_prompt
|
|
||||||
function fish_prompt
|
|
||||||
printf '\e]51;e;B\e\\\\'
|
|
||||||
__eat_original_fish_prompt $argv
|
|
||||||
printf '\e]51;e;C\e\\\\'
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
function _eat_msg
|
|
||||||
set msg (printf '\e]51;e;M')
|
|
||||||
for arg in $argv
|
|
||||||
set msg $msg "$(echo -n -- $arg | base64)"
|
|
||||||
end
|
|
||||||
printf "%s\e\\\\" (string join ";" $msg)
|
|
||||||
end
|
|
||||||
|
|
||||||
if status is-interactive
|
|
||||||
and test -z $__eat_integration_enabled
|
|
||||||
and set -q EAT_SHELL_INTEGRATION_DIR
|
|
||||||
and string match -q "eat-*" $TERM
|
|
||||||
|
|
||||||
eat_enable_integration
|
|
||||||
end
|
|
||||||
|
|
||||||
# Local Variables:
|
|
||||||
# mode: fish
|
|
||||||
# End:
|
|
||||||
|
|
@ -66,11 +66,11 @@
|
||||||
'(package-selected-packages
|
'(package-selected-packages
|
||||||
'(adaptive-wrap add-node-modules-path bazel blacken claudemacs clipetty
|
'(adaptive-wrap add-node-modules-path bazel blacken claudemacs clipetty
|
||||||
clojure-mode company dap-mode deadgrep doom-themes
|
clojure-mode company dap-mode deadgrep doom-themes
|
||||||
earthfile-mode eat eglot-java filladapt fish-mode
|
earthfile-mode eglot-java filladapt fish-mode flycheck-elm
|
||||||
flycheck-elm go-mode howm ink-mode jsonnet-mode magit
|
go-mode howm ink-mode jsonnet-mode magit poly-markdown
|
||||||
poly-markdown prettier-js protobuf-mode ron-mode rust-mode
|
prettier-js protobuf-mode ron-mode rust-mode scala-ts-mode
|
||||||
scala-ts-mode sql-indent swift-mode terraform-mode
|
sql-indent swift-mode terraform-mode typescript-mode
|
||||||
typescript-mode wgsl-mode xterm-color zig-mode))
|
wgsl-mode xterm-color zig-mode))
|
||||||
'(package-vc-selected-packages '((claudemacs :url "https://github.com/cpoile/claudemacs")))
|
'(package-vc-selected-packages '((claudemacs :url "https://github.com/cpoile/claudemacs")))
|
||||||
'(reb-re-syntax 'string)
|
'(reb-re-syntax 'string)
|
||||||
'(rmail-mail-new-frame t)
|
'(rmail-mail-new-frame t)
|
||||||
|
|
|
||||||
|
|
@ -1501,8 +1501,7 @@ Do this when you edit your project view."
|
||||||
;; =================================================================
|
;; =================================================================
|
||||||
;; Terminal
|
;; Terminal
|
||||||
;; =================================================================
|
;; =================================================================
|
||||||
(use-package eat :ensure t
|
(use-package eat :ensure t)
|
||||||
:bind (("C-c T" . eat-project)))
|
|
||||||
|
|
||||||
;; =================================================================
|
;; =================================================================
|
||||||
;; ron-mode
|
;; ron-mode
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue