ansible-module-shellmarks
ansible-module-shellmarks is a ansible module to set bookmarks to commonly used directories like the tools shellmarks / bashmarks do.
shellmarks and bashmarks are shell scripts that allows you to save and jump to commonly used directories with tab completion.
Both tools store their bookmarks in a text file called ~/.sdirs. This module is able to write bookmarks to this file.
export DIR_shell_scripts_SHELL_GITHUB="$HOME/shell-scripts" export DIR_shellmarks_module_ansible="$HOME/ansible-module-shellmarks" export DIR_skeleton_SHELL_GITHUB="$HOME/skeleton.sh"
> SHELLMARKS (/etc/ansible/library/shellmarks.py)
shellmarks https://github.com/Bilalh/shellmarks bashmarks
https://github.com/huyng/bashmarks are shell scripts that
allows you to save and jump to commonly used directories with
tab completion.
OPTIONS (= is mandatory):
- cleanup
Delete bookmarks of nonexistent directories.
default: false
- delete_duplicates
Delete duplicate bookmark entries. This option deletes both
duplicate mark and duplicate path entries. Entries at the
beginning are deleted, entries at the end are perserved.
default: false
- export
Command line string to export the bookmarks. The string %mark
is replaced with the mark and %path is replaced with the path.
For example 'autojump --add %path' or 'zoxide add %path'.
default: null
- export_query
Command line string to query if the bookmark is already
exported. The string %mark is replaced with the mark and %path
is replaced with the path. For example 'zoxide query %path'.
default: null
- mark
Name of the bookmark.
aliases: [bookmark]
default: null
- path
Full path to the directory.
aliases: [src]
default: null
- replace_home
Replace home directory with $HOME variable.
default: true
- sdirs
The path to the file where the bookmarks are stored.
default: ~/.sdirs
- sorted
Sort entries in the bookmark file.
default: true
- state
State of the mark.
aliases: [src]
choices: [present, absent]
default: present
AUTHOR: Josef Friedrich (@Josef-Friedrich)
METADATA:
metadata_version: '1.0'
status:
- preview
supported_by: community
EXAMPLES:
# Bookmark the ansible configuration directory
- shellmarks:
mark: ansible
path: /etc/ansible
state: present
# Delete bookmark of the ansible configuration directory
- shellmarks:
mark: ansible
path: /etc/ansible
state: absent
# Replace home directory with $HOME variable
- shellmarks:
replace_home: true
# Sort entries in the bookmark file
- shellmarks:
sorted: true
# Delete bookmarks of no longer existing directories
- shellmarks:
cleanup: true
RETURN VALUES:
- changes
A list of actions
returned: On changed
sample: [{action: add, mark: dir1, path: /dir1}, {action: delete, mark: dir1, path: /dir1},
{action: sort, reverse: false, sort_by: mark}, {action: cleanup, count: 1}]
type: list
Development
Test functionality
/usr/local/src/ansible/hacking/test-module -m shellmarks.py -a
Test documentation
source /usr/local/src/ansible/hacking/env-setup /usr/local/src/ansible/test/sanity/validate-modules/validate-modules --arg-spec --warnings shellmarks.py
Generate documentation
ansible-doc -M . shellmarks
Metadata
Release files for shellmarks 3.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| shellmarks-3.0.0.tar.gz | 21.2 kB | Without provenance | Details for shellmarks-3.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| shellmarks-3.0.0-py3-none-any.whl | Python 3 | none | any | Details for shellmarks-3.0.0-py3-none-any.whl |
Total release size: 42.9 kB
Release files / shellmarks-3.0.0.tar.gz
| Download URL | shellmarks-3.0.0.tar.gz |
|---|---|
| Size | 21.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
41701e9562a9fa66154008873e45e517845a1f8c04cf985708772ab53088e802
|
|
BLAKE2b-256 checksum How to use checksums |
233bac0c22dbafec4e60ba75e93fea573b19d1df0d65ab5a34cfef8d75a980a4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.7.1 CPython/3.12.1 Linux/6.2.0-1019-azure
|
Release files / shellmarks-3.0.0-py3-none-any.whl
| Download URL | shellmarks-3.0.0-py3-none-any.whl |
|---|---|
| Size | 21.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
4965ff0911babd1e29ebf813fdc2138b3ddf35f5c71fb4d8f1262f51e5d8d5fa
|
|
BLAKE2b-256 checksum How to use checksums |
7dcee87063a815fd0e379b09c864aacea0303d5449c22b45104c381ba28fe5d0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.7.1 CPython/3.12.1 Linux/6.2.0-1019-azure
|
Security for shellmarks 3.0.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.