mirror of
https://github.com/fort-nix/nix-bitcoin.git
synced 2024-11-26 16:18:52 +03:00
0f1ee5f533
- Add usage prompt when starting shell sessions - Give all examples an uniform interface ("c") for running commands or starting a shell on the node.
16 lines
532 B
Bash
16 lines
532 B
Bash
# Start an interactive bash session in the current bash environment.
|
|
|
|
USAGE_INFO='
|
|
Starting shell...
|
|
Run "c COMMAND" to execute a command on the bitcoin node
|
|
Run "c" to start a shell session inside the node'
|
|
|
|
# BASH_ENVIRONMENT contains definitions of read-only variables like 'BASHOPTS' that
|
|
# cause warnings on evaluation. Suppress these warnings while sourcing.
|
|
BASH_ENVIRONMENT=<(declare -p; declare -pf) \
|
|
USAGE_INFO="$USAGE_INFO" \
|
|
bash --rcfile <(echo '
|
|
source $BASH_ENVIRONMENT 2>/dev/null
|
|
echo "$USAGE_INFO"
|
|
')
|