[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/eat b3c81c3078 4/7: Move Bash global variables to function
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/eat b3c81c3078 4/7: Move Bash global variables to function |
Date: |
Wed, 7 Dec 2022 04:58:42 -0500 (EST) |
branch: elpa/eat
commit b3c81c30787b095e4f7d7d7dce9e416d0dfaefe5
Author: Akib Azmain Turja <akib@disroot.org>
Commit: Akib Azmain Turja <akib@disroot.org>
Move Bash global variables to function
* integration/bash (__eat_current_command, __eat_exit_status)
(__eat_inhibit_preexec): Move to '__eat_enable_integration'.
* integration/bash (__eat_prompt_start, __eat_prompt_end)
(__eat_continuation_start, __eat_continuation_end): Move to
'__eat_enable_integration' and make local there.
---
integration/bash | 17 +++++++----------
1 file changed, 7 insertions(+), 10 deletions(-)
diff --git a/integration/bash b/integration/bash
index 41b530136b..03ca465436 100644
--- a/integration/bash
+++ b/integration/bash
@@ -17,9 +17,6 @@
# For a full copy of the GNU General Public License
# see <https://www.gnu.org/licenses/>.
-__eat_current_command=""
-__eat_exit_status=0
-
__eat_prompt_command () {
# Send exit status.
if test -n "$__eat_current_command"
@@ -55,8 +52,6 @@ __eat_preexec () {
"$__eat_current_command"
}
-__eat_inhibit_preexec=yes
-
__eat_before_prompt_command ()
{
__eat_exit_status="$?"
@@ -77,14 +72,16 @@ __eat_before_exec () {
fi
}
-__eat_prompt_start='\e]51;e;B\e\\'
-__eat_prompt_end='\e]51;e;C\e\\'
-__eat_continuation_start='\e]51;e;D\e\\'
-__eat_continuation_end='\e]51;e;E\e\\'
-
__eat_enable_integration ()
{
__eat_integration_enabled=yes
+ __eat_current_command=""
+ __eat_exit_status=0
+ __eat_inhibit_preexec=yes
+ local __eat_prompt_start='\e]51;e;B\e\\'
+ local __eat_prompt_end='\e]51;e;C\e\\'
+ local __eat_continuation_start='\e]51;e;D\e\\'
+ local __eat_continuation_end='\e]51;e;E\e\\'
PS1="\[$__eat_prompt_start\]$PS1\[$__eat_prompt_end\]"
PS2="\[$__eat_continuation_start\]$PS2\[$__eat_continuation_end\]"
PROMPT_COMMAND+=(__eat_prompt_command)
- [nongnu] elpa/eat updated (693940c733 -> 58fd1b1196), ELPA Syncer, 2022/12/07
- [nongnu] elpa/eat 2ea84e0a34 2/7: Don't accept 'nil' as annotation correction delay, ELPA Syncer, 2022/12/07
- [nongnu] elpa/eat b3c81c3078 4/7: Move Bash global variables to function,
ELPA Syncer <=
- [nongnu] elpa/eat e05931d7e9 3/7: Document annotation correction delay user option, ELPA Syncer, 2022/12/07
- [nongnu] elpa/eat a65b7bc064 1/7: Rename some symbols to reflect their purposes, ELPA Syncer, 2022/12/07
- [nongnu] elpa/eat e6a7deafd0 5/7: Auto update 'eat-term-shell-integration-directory', ELPA Syncer, 2022/12/07
- [nongnu] elpa/eat 58fd1b1196 7/7: Synchronize scrolling only when point is on cursor, ELPA Syncer, 2022/12/07
- [nongnu] elpa/eat ebc77efd0f 6/7: Escape control characters in trace output, ELPA Syncer, 2022/12/07