add SaveSession function with name entry and default fallback

This commit is contained in:
Joe 2020-02-16 08:32:42 -06:00
parent a6da5ccd6d
commit 908411c539
Signed by: joe
GPG Key ID: 8595A3F8F2CE1B74
1 changed files with 6 additions and 0 deletions

6
ysm.sh
View File

@ -58,6 +58,12 @@ LoadSession() {
python2.7 ysess -i "${sessions[$selection]}"
}
SaveSession() {
read -rp "Session name (${config[name]}):" name
if [ -z "$name" ]; then name=${config[name]};fi
python2.7 ysess -o "${config[path]}/$name.${config[extension]}"
}
Debug() {
echo Debug Enabled!
echo Sessions: ${config[path]}/*.${config[extension]}