Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
P
penta-sessions
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
eri! 451 von Buffellow
penta-sessions
Commits
e99e6abc
Commit
e99e6abc
authored
13 years ago
by
M Rawash
Browse files
Options
Downloads
Patches
Plain Diff
added :sessionappend
parent
a8329d17
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
penta-sessions.js
+58
-0
58 additions, 0 deletions
penta-sessions.js
with
58 additions
and
0 deletions
penta-sessions.js
+
58
−
0
View file @
e99e6abc
...
...
@@ -66,6 +66,21 @@ var INFO =
<
/p
>
<
/description
>
<
/item
>
<
item
>
<
tags
>
sa
:
sessiona
:
sessionappend
:
sessionadd
<
/tags
>
<
strut
/>
<
spec
>
:
sessiona
<
oa
>
ppend
<
/oa><oa>!</
oa
>
<
oa
>
file
<
/oa></
spec
>
<
spec
>
sa
<
/spec
>
<
description
>
<
p
>
Appends
current
tab
to
an
existing
session
file
.
If
a
!
was
supplied
it
will
append
all
tabs
in
current
window
instead
.
<
/p
>
<
p
>
If
<
oa
>
file
<
/oa> is a basename, it will look for it in <o>sessiondir</
o
>
.
<
/p
>
<
/description
>
<
/item
>
<
item
>
<
tags
>
sl
:
sessionl
:
sessionload
<
/tags
>
<
strut
/>
...
...
@@ -143,6 +158,44 @@ group.commands.add(['sessions[ave]','mkses[sion]'],
}
);
group
.
commands
.
add
([
'
sessiona[ppend]
'
,
'
sessionadd
'
],
'
Append tab(s) to a session file
'
,
function
(
args
)
{
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
()));
return
;
}
let
data
=
''
;
if
(
args
.
bang
)
{
tabs
.
visibleTabs
.
forEach
(
function
(
tab
,
i
)
{
data
+=
'
\n
t
'
+
tab
.
linkedBrowser
.
contentDocument
.
location
.
href
;
});
}
else
{
data
+=
'
\n
t
'
+
gBrowser
.
mCurrentTab
.
linkedBrowser
.
contentDocument
.
location
.
href
;
}
try
{
file
.
write
(
data
,
'
>>
'
);
}
catch
(
e
)
{
dactyl
.
echoerr
(
_
(
"
io.notWriteable
"
,
file
.
path
.
quote
()));
return
;
};
dactyl
.
echomsg
(
'
Appended tab(s) to session file
'
+
file
.
path
.
quote
());
},
{
argCount
:
'
1
'
,
bang
:
true
,
completer
:
function
(
context
)
{
context
.
anchored
=
false
;
/^
\/
/
.
test
(
context
.
filter
)
?
completion
.
file
(
context
,
true
)
:
completion
.
file
(
context
,
true
,
options
.
sessiondir
);
}
}
);
group
.
commands
.
add
([
'
sessionl[oad]
'
],
'
Load a session file
'
,
function
(
args
)
{
...
...
@@ -176,6 +229,11 @@ group.mappings.add([modes.NORMAL], ['ss'],
function
()
{
CommandExMode
().
open
(
'
sessionsave!
'
)}
);
group
.
mappings
.
add
([
modes
.
NORMAL
],
[
'
sa
'
],
'
Append tab(s) to a session file
'
,
function
()
{
CommandExMode
().
open
(
'
sessionappend
'
)}
);
group
.
mappings
.
add
([
modes
.
NORMAL
],
[
'
sl
'
],
'
Load a session file
'
,
function
()
{
CommandExMode
().
open
(
'
sessionload
'
)}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment