mirror of
https://github.com/kovidgoyal/kitty.git
synced 2026-06-10 01:51:09 +00:00
Use an env var to control shell integration
This commit is contained in:
parent
2e5308ad40
commit
7dec7d615a
1 changed files with 6 additions and 7 deletions
|
|
@ -1,13 +1,12 @@
|
|||
local args
|
||||
typeset -a args
|
||||
args=($@)
|
||||
() {
|
||||
if [[ ! -o interactive ]]; then return; fi
|
||||
|
||||
if [[ -z "$kitty_shell_integration" ]]; then return; fi
|
||||
typeset -g -A kitty_prompt=([state]='first-run' [cursor]='y' [title]='y')
|
||||
|
||||
(( ${args[(I)no-cursor]} )) && kitty_prompt[cursor]="n"
|
||||
(( ${args[(I)no-title]} )) && kitty_prompt[title]="n"
|
||||
for i in ${=kitty_shell_integration}; do
|
||||
if [[ "$i" == "no-cursor" ]]; then kitty_prompt[cursor]='n'; fi
|
||||
if [[ "$i" == "no-title" ]]; then kitty_prompt[title]='n'; fi
|
||||
done
|
||||
unset kitty_shell_integration
|
||||
|
||||
function debug() {
|
||||
# print a line to STDOUT of parent kitty process
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue