diff --git a/README.md b/README.md index 21d7242..0354bb2 100644 --- a/README.md +++ b/README.md @@ -65,6 +65,15 @@ export emojis=YOUR_CHOIC - `auto`: always display emojis on GNU/Linux, disabled on WSL because of crappy terminal - `yes`, `no`: force enable/disable +### Custom SecureCRT config path +```bash +export crtconfig="/path/to/your/Config" +``` + +Overrides default SecureCRT config paths: +- GNU/Linux: `~/.vandyke/SecureCRT/Config` +- Windows: `%APPDATA%/VanDyke/Config` (⇒ usually `/mnt/c/Users/your.user/AppData/VanDyke/Config`) + ## Bugs I expect it to be full of bugs; so should you. diff --git a/shcrt b/shcrt index 435892c..e173913 100755 --- a/shcrt +++ b/shcrt @@ -18,6 +18,14 @@ source ~/.shcrtrc 2> /dev/null ## Emojis - auto, yes, no export emojis="auto" + +## Custom SecureCRT config path +# Set to override defaults: +# - GNU/Linux: ~/.vandyke/SecureCRT/Config +# - Windows: %APPDATA%/VanDyke/Config +# On WSL it needs to be a Linux path! + +#export crtconfig="/your/path/to/Config" ########### /Script config ############# function is_wsl { @@ -76,11 +84,15 @@ function no_dollars { } function scrt_session_path { - if is_wsl; then - appdata="$(wsl_win_var '%APPDATA%' | win_path_to_wsl)" - echo "$appdata/VanDyke/Config/Sessions" + if [[ "$crtconfig" != "" ]]; then + echo "$crtconfig/Sessions" else - echo "$HOME/.vandyke/SecureCRT/Config/Sessions" + if is_wsl; then + appdata="$(wsl_win_var '%APPDATA%' | win_path_to_wsl)" + echo "$appdata/VanDyke/Config/Sessions" + else + echo "$HOME/.vandyke/SecureCRT/Config/Sessions" + fi fi }