From 97c7fbf9b1265739422ad09d8bf04532e46fa18b Mon Sep 17 00:00:00 2001 From: Michael Rose Date: Wed, 22 Jul 2015 16:27:11 +0000 Subject: [PATCH 1/3] String.quote is no longer a valid function and in any case seems to be uneccesary in this case therefore I have removed it to enable this to work with recent version of Firefox that no longer provide support for String.quote --- penta-sessions.js | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/penta-sessions.js b/penta-sessions.js index f529a7f..c81b45a 100644 --- a/penta-sessions.js +++ b/penta-sessions.js @@ -75,7 +75,7 @@ group.commands.add(['sessions[ave]','mkses[sion]'], options.sessiondir+args[0]) : options.sessiondir+Date.now()+'.penta' let file = io.File(filename); - dactyl.assert(!file.exists() || args.bang, _("io.exists", file.path.quote())); + dactyl.assert(!file.exists() || args.bang, _("io.exists", file.path)); let sesop = options.sessionoptions.toString(); let lines = new Array('" vim: set ft=pentadactyl:\n'); @@ -109,12 +109,12 @@ group.commands.add(['sessions[ave]','mkses[sion]'], try { file.write(lines.join('\n')); } catch(e) { - dactyl.echoerr(_("io.notWriteable", file.path.quote())); + dactyl.echoerr(_("io.notWriteable", file.path)); return; }; options.sessionfile=file.path; - dactyl.echomsg('Saved session to '+file.path.quote()); + dactyl.echomsg('Saved session to '+file.path); }, { argCount: '?', bang: true, @@ -128,7 +128,7 @@ group.commands.add(['sessiona[ppend]', 'sessionadd'], let file = io.File(/^~?\//.test(args[0]) ? args[0] : options.sessiondir+args[0]); if (!file.exists() || !file.isWritable() || file.isDirectory()) { - dactyl.echoerr(_("io.notWriteable", file.path.quote())); + dactyl.echoerr(_("io.notWriteable", file.path)); return; } @@ -144,11 +144,11 @@ group.commands.add(['sessiona[ppend]', 'sessionadd'], try { file.write(data,'>>'); } catch(e) { - dactyl.echoerr(_("io.notWriteable", file.path.quote())); + dactyl.echoerr(_("io.notWriteable", file.path)); return; }; - dactyl.echomsg('Appended tab(s) to session file '+file.path.quote()); + dactyl.echomsg('Appended tab(s) to session file '+file.path); }, { argCount: '1', bang: true, @@ -162,7 +162,7 @@ group.commands.add(['sessionl[oad]'], let file = io.File(/^~?\//.test(args[0]) ? args[0] : options.sessiondir+args[0]); if (!file.exists() || !file.isReadable() || file.isDirectory()) { - dactyl.echoerr(_("io.notReadable", file.path.quote())); + dactyl.echoerr(_("io.notReadable", file.path)); return; } @@ -172,7 +172,7 @@ group.commands.add(['sessionl[oad]'], sessionscript.unload(); options.sessionfile=file.path; if(!args.bang) tabs.remove(curtab); - dactyl.echomsg('Loaded session from '+file.path.quote()); + dactyl.echomsg('Loaded session from '+file.path); }, { argCount: "1", bang: true, @@ -180,17 +180,17 @@ group.commands.add(['sessionl[oad]'], } ); -group.mappings.add([modes.NORMAL], ['ss'], +group.mappings.add([modes.NORMAL], [',ss'], 'Save current window', function() CommandExMode().open('sessionsave! ') ); -group.mappings.add([modes.NORMAL], ['sa'], +group.mappings.add([modes.NORMAL], [',sa'], 'Append tab(s) to a session file', function() CommandExMode().open('sessionappend ') ); -group.mappings.add([modes.NORMAL], ['sl'], +group.mappings.add([modes.NORMAL], [',sl'], 'Load a session file', function() CommandExMode().open('sessionload ') ); From ca46c48d42c3f8d723897ead2033ced5bd342359 Mon Sep 17 00:00:00 2001 From: Michael Rose Date: Wed, 22 Jul 2015 16:35:36 +0000 Subject: [PATCH 2/3] Added Readme --- README.md | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..2eca77d --- /dev/null +++ b/README.md @@ -0,0 +1,10 @@ +# Penta-Sessions +#### A vim like session manager created by Gwash + +https://github.com/gwash + +# Usage + :sessionsave foo - save current tabs to foo + :sessionsave! foo - save current tabs to foo overwriting if neccesary + :sessionload foo - replace current tabs with foo + :sessionload! foo - add foo to current tabs From df95b8dc53c0682b228835b7177c17e41a3fc320 Mon Sep 17 00:00:00 2001 From: Michael Rose Date: Wed, 22 Jul 2015 16:39:20 +0000 Subject: [PATCH 3/3] spacing fixed --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 2eca77d..c66157a 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ https://github.com/gwash # Usage - :sessionsave foo - save current tabs to foo - :sessionsave! foo - save current tabs to foo overwriting if neccesary - :sessionload foo - replace current tabs with foo - :sessionload! foo - add foo to current tabs + :sessionsave foo - save current tabs to foo + :sessionsave! foo - save current tabs to foo overwriting if neccesary + :sessionload foo - replace current tabs with foo + :sessionload! foo - add foo to current tabs