This commit is contained in:
Amos Bird 2020-12-18 17:29:55 +08:00
parent fe16aec48b
commit fb5de60d7a
No known key found for this signature in database
GPG Key ID: 80D430DCBECFEDB4
3 changed files with 32 additions and 0 deletions

View File

@ -0,0 +1,29 @@
#!/usr/bin/env bash
#\
export CURDIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
#\
. "$CURDIR"/../shell_config.sh
#\
export EDITOR=$CURDIR/01610_client_spawn_editor_open.editor
#\
exec expect -f $CURDIR/01610_client_spawn_editor.sh "$@"
log_user 0
set timeout 1
spawn clickhouse-client
expect ":) "
# Open EDITOR
send -- "\033E"
# Send return
send -- "\r"
expect {
"│ 1 │" { }
timeout { exit 1 }
}
expect ":) "
send -- ""
expect eof

View File

@ -0,0 +1,3 @@
#!/usr/bin/env bash
echo "select 1" > "$1"