Initial commit

This commit is contained in:
Davide Depau 2019-09-06 18:58:07 +02:00
commit d5790a8e98
Signed by: depau
GPG key ID: C7D999B6A55EFE86
3 changed files with 41 additions and 0 deletions

3
.gitmodules vendored Normal file
View file

@ -0,0 +1,3 @@
[submodule "easybashgui"]
path = easybashgui
url = https://github.com/BashGui/easybashgui.git

1
easybashgui Submodule

@ -0,0 +1 @@
Subproject commit c7c6c7c1013c006feeb67ef820805d2d5029ef3e

37
shcrt Normal file
View file

@ -0,0 +1,37 @@
#!/bin/bash
export SHELL_LIBRARY_PATH="$SHELL_LIBRARY_PATH:./easybashgui/lib"
export PATH="$PATH:./easybashgui/src"
source easybashgui
function is_wsl {
grep -q Microsoft /proc/version
return $?
}
function win_path_to_wsl {
echo "$1" | sed '[\]|/|g'
}
function scrt_session_path {
if is_wsl; then
appdata="$(cmd.exe /C 'echo %APPDATA%')"
echo "$appdata/VanDyke/Config/Sessions"
else
echo "$HOME/.vandyke/SecureCRT/Config/Sessions"
fi
}
session_path="$(scrt_session_path)"
current_path=""
function scrt_cd {
if [ ! -d "$session_path/$current_path" ]; then
return 1
fi
current_path="$current_path/$1"
}
function scrt_ls {
return 1;
}