diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 0000000..58e28b4 --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,22 @@ +{ + // Use IntelliSense to learn about possible attributes. + // Hover to view descriptions of existing attributes. + // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 + "version": "0.2.0", + "configurations": [ + { + "type": "bashdb", + "request": "launch", + "name": "Bash-Debug (hardcoded script name)", + "cwd": "${workspaceFolder}", + "program": "${workspaceFolder}/path/to/script.sh", + "args": [] + }, + { + "type": "bashdb", + "request": "launch", + "name": "Bash-Debug (simplest configuration)", + "program": "${file}" + } + ] +} \ No newline at end of file diff --git a/main b/main index 2ac1e86..fd911d2 100755 --- a/main +++ b/main @@ -11,18 +11,20 @@ function bashrc_count_lines { function bashrc_watch_start { if [[ -z "${BASHRC_LINES+set}" ]]; then BASHRC_LINES=$(bashrc_count_lines) + else + BASHRC_EVOLVED=true fi } function bashrc_watch_end { bashrc_lines=$(bashrc_count_lines) - if [[ "$BASHRC_LINES" -lt "$bashrc_lines" ]]; then + if [[ "$BASHRC_LINES" -lt "$bashrc_lines" || -n "${BASHRC_EVOLVED+set}" ]]; then echo echo '*****************************' - echo '* BASHRC has evolved *' - echo '* please execute: *' + echo '* BASHRC has evolved! *' + echo '* please synchronize: *' echo '* *' - echo "* source \$HOME/.bashrc *" + echo "* source ~/.bashrc *" echo '* *' echo '*****************************' echo @@ -52,6 +54,7 @@ bashrc_watch_start echo 'init' bashrc_env_sync 'SESSION_RESTART' true +bashrc_env_sync 'TOTO' fluo echo 'end' bashrc_watch_end