Commit Graph

4847 Commits

Author SHA1 Message Date
Xavier Delaruelle
90b5373db5 gh: update actions/checkout to v3 2022-10-12 20:57:48 +02:00
Xavier Delaruelle
bfd6116148 gh: move windows tests to windows-2022 image 2022-10-12 07:49:52 +02:00
Xavier Delaruelle
e7aacb8a24 ts: fix env of clear subcmd test case 2022-10-11 18:57:57 +02:00
Xavier Delaruelle
6599131c1b install: correct arg order for date cmd on FreeBSD 2022-10-11 06:52:54 +02:00
Xavier Delaruelle
d2c97fd845 doc: desc. stash env in MIGRATING 2022-10-10 07:54:17 +02:00
Xavier Delaruelle
72a210fc3f doc: desc stash in collection section of man page 2022-10-07 07:24:26 +02:00
Xavier Delaruelle
96e926483c ts: test savelist subcmd with stash collections 2022-10-07 06:54:42 +02:00
Xavier Delaruelle
6b4e111d33 doc: desc. savelist stash filter in design/NEWS/man doc 2022-10-07 06:54:42 +02:00
Xavier Delaruelle
b5d6ad81aa Filter stash collection on savelist
Update savelist sub-command to filter out stash collections unless --all
option is set.
2022-10-07 06:54:42 +02:00
Xavier Delaruelle
b1b4096848 ts: test restore subcmd with stash collections 2022-10-07 06:54:42 +02:00
Xavier Delaruelle
c3d06a65e0 init: update completion with stashlist output
Update stashpop, stashrm and stashshow completion definition to use
stashlist output.
2022-10-05 07:59:34 +02:00
Xavier Delaruelle
b2f5dbc0a5 ts: clear MODULES_QUARANTINE_SUPPORT prior tests 2022-10-04 07:41:37 +02:00
Xavier Delaruelle
8eee715bef ts: add stashlist sub-cmd tests 2022-10-04 07:41:37 +02:00
Xavier Delaruelle
1cdd5d319c ts: add helper procs for collection list header msgs 2022-10-04 07:41:37 +02:00
Xavier Delaruelle
15591e5add Core code for cmdModuleStashlist
Implement 'stashlist' sub-command. Rely on cmdModuleSavelist but adapt
this procedure to make several behavior changes when called by
cmdModuleStashlist:

* elements are sorted in reverse order
* element index starts at 0
* when no collection target set, only return collection without a target
  set
2022-10-04 07:41:37 +02:00
Xavier Delaruelle
40867351c2 Add getCallingProcName util proc
Return name of calling procedure with getCallingProcName.
2022-10-04 07:41:37 +02:00
Xavier Delaruelle
43beec6df5 Add start_idx argument on displayElementList
Add start_idx argument on displayElementList procedure to define what is
the starting index for the elements to report.
2022-10-02 14:26:28 +02:00
Xavier Delaruelle
0b3ceef5ea doc: desc. stashlist subcmd in NEWS/man/changes 2022-10-02 14:26:28 +02:00
Xavier Delaruelle
8556a361cb ts: adapt existing testfiles for stashlist sub-command 2022-10-02 14:26:28 +02:00
Xavier Delaruelle
d20c6228a8 init: add stashlist subcmd to completion scripts 2022-10-02 14:26:28 +02:00
Xavier Delaruelle
50e0bcbe3a Add 'stashlist' sub-command
Introduce stashlist sub-command to list stash collection file.

This sub-command cannot be called from a modulefile evaluation context.

Add sub-command empty skeleton: cmdModuleStashlist.

Sub-command accepts no argument. It accepts --terse, --long and --json
options.
2022-10-02 10:05:28 +02:00
Xavier Delaruelle
afc051b8ab doc: desc. stashlist in stash-environment design doc 2022-10-02 10:05:28 +02:00
Xavier Delaruelle
7ea1414745 ts: add stashclear sub-cmd tests 2022-09-29 07:02:38 +02:00
Xavier Delaruelle
7fed10153c Core code for cmdModuleStashclear
Implement 'stashclear' sub-command. Fetch all existing stash collection
for current collection target. Then call 'saverm' sub-command over all
of these collection obtained.
2022-09-29 07:02:38 +02:00
Xavier Delaruelle
53f12d65a2 ts: adapt existing testfiles for stashclear subcmd 2022-09-29 07:02:38 +02:00
Xavier Delaruelle
6a010c984f doc: desc. stashclear subcmd in NEWS/man/changes 2022-09-29 07:02:38 +02:00
Xavier Delaruelle
0e756ba56e init: add stashclear subcmd to completion scripts 2022-09-29 07:02:38 +02:00
Xavier Delaruelle
a98ccf1ca0 Add 'stashclear' sub-command
Introduce stashclear sub-command to delete all stash collection file.

This sub-command cannot be called from a modulefile evaluation context.

Add sub-command empty skeleton: cmdModuleStashclear.

Sub-command accepts no argument nor option.
2022-09-29 07:02:38 +02:00
Xavier Delaruelle
5d0281cba9 doc: desc. stashclear in stash-environment design doc 2022-09-29 07:02:38 +02:00
Xavier Delaruelle
e70a6c2ff9 ts: accept version name with '/' char 2022-09-29 07:02:38 +02:00
Xavier Delaruelle
88ca25b0e0 ts: add stashshow sub-cmd tests 2022-09-29 07:02:38 +02:00
Xavier Delaruelle
0e9d62e8f7 Core code for cmdModuleStashshow
Implement 'stashshow' sub-command. Parse stash argument to get
corresponding collection, then call saveshow over this collection name.
2022-09-29 07:02:38 +02:00
Xavier Delaruelle
4d2bca5b33 doc: desc. stashshow subcmd in NEWS/man/changes 2022-09-29 07:02:38 +02:00
Xavier Delaruelle
3052bcf280 ts: adapt existing testfiles for stashshow sub-command 2022-09-29 07:02:38 +02:00
Xavier Delaruelle
8af7d4568f init: add stashshow subcmd to completion scripts 2022-09-29 07:02:38 +02:00
Xavier Delaruelle
9d539c4479 Add 'stashshow' sub-command
Introduce stashshow sub-command to display stash collection file.

This sub-command cannot be called from a modulefile evaluation context.

Add sub-command empty skeleton: cmdModuleStashshow.

Sub-command accepts no option. It may take an optional argument: the
index of the stash collection to display or the name of the stash
collection. If no argument is provided, stash collection 0 is assumed.
2022-09-28 07:21:30 +02:00
Xavier Delaruelle
f271094ea2 doc: desc. stashshow in stash-environment design doc 2022-09-28 07:21:30 +02:00
Xavier Delaruelle
96a7559850 ts: add stashrm sub-cmd tests 2022-09-28 07:21:30 +02:00
Xavier Delaruelle
07caa4594c Core code for cmdModuleStashrm
Implement 'stashrm' sub-command. Parse stash argument to get
corresponding collection, then call saverm over this collection name.
2022-09-28 07:21:30 +02:00
Xavier Delaruelle
66bd9e23b1 Move collection resolution from stash in dedicated proc
Move collection name resolution from stash name from cmdModuleStashpop
into getCollectionFromStash procedure.
2022-09-28 07:21:30 +02:00
Xavier Delaruelle
11d3972eac doc: desc. stashrm subcmd in NEWS/man/changes 2022-09-28 07:21:30 +02:00
Xavier Delaruelle
73049c1d45 ts: adapt existing testfiles for stashrm sub-command 2022-09-28 07:21:30 +02:00
Xavier Delaruelle
3463d123d0 init: add stashrm subcmd to completion scripts 2022-09-28 07:21:30 +02:00
Xavier Delaruelle
3358134471 Add 'stashrm' sub-command
Introduce stashrm sub-command to delete stash collection file.

This sub-command cannot be called from a modulefile evaluation context.

Add sub-command empty skeleton: cmdModuleStashrm.

Sub-command accepts no option. It may take an optional argument: the
index of the stash collection to delete or the name of the stash
collection. If no argument is provided, stash collection 0 is assumed.
2022-09-28 07:20:54 +02:00
Xavier Delaruelle
530c91a1e5 doc: desc. stashrm in stash-environment design doc 2022-09-28 07:20:54 +02:00
Xavier Delaruelle
b8d0257157 ts: add stashpop sub-cmd tests 2022-09-28 07:20:54 +02:00
Xavier Delaruelle
fc235534db Core code for cmdModuleStashpop
Implement 'stashpop' sub-command. First parse stash argument to
determine corresponding stash collection name or raise an error if stash
value is invalid. Then restore stash collection. Afterward delete stash
collection.
2022-09-28 07:20:54 +02:00
Xavier Delaruelle
01bcbd5054 Add no_other_target option to findCollections
Add no_other_target option to findCollections procedure to filter when
glob searching the result from other target. Especially useful when
collections for specific targets exist but no target is currently set in
user environment.

This no_other_target is disabled by default. savelist sub-command
currently returns other targets when no target is set. But the option
will be enabled for stashpop, to ensure that the popped collection is
from the current target or from the *no target* if none set.
2022-09-28 07:20:54 +02:00
Xavier Delaruelle
1e4bf541f6 doc: desc. stashpop subcmd in NEWS/man/changes 2022-09-28 07:20:54 +02:00
Xavier Delaruelle
5719546c7e ts: adapt existing testfiles for stashpop sub-command 2022-09-28 07:20:54 +02:00