.. image:: http://img.shields.io/pypi/v/shellmarks.svg
:target: https://pypi.org/project/shellmarks
:alt: This package on the Python Package Index
.. image:: https://github.com/Josef-Friedrich/ansible-module-shellmarks/actions/workflows/tests.yml/badge.svg
:target: https://github.com/Josef-Friedrich/ansible-module-shellmarks/actions/workflows/tests.yml
:alt: Tests
ansible-module-shellmarks
=========================
``ansible-module-shellmarks`` is a `ansible <https://www.ansible.com>`_
module to set bookmarks to commonly used directories like the tools
`shellmarks <https://github.com/Bilalh/shellmarks>`_ /
`bashmarks <https://github.com/huyng/bashmarks>`_ do.
`shellmarks <https://github.com/Bilalh/shellmarks>`_ and
`bashmarks <https://github.com/huyng/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"
.. code-block::
> 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
Raw data
{
"_id": null,
"home_page": "https://github.com/Josef-Friedrich/ansible-module-shellmarks",
"name": "shellmarks",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.10,<4.0",
"maintainer_email": "",
"keywords": "",
"author": "Josef Friedrich",
"author_email": "josef@friedrich.rocks",
"download_url": "https://files.pythonhosted.org/packages/23/3b/ac0c22dbafec4e60ba75e93fea573b19d1df0d65ab5a34cfef8d75a980a4/shellmarks-3.0.0.tar.gz",
"platform": null,
"description": ".. image:: http://img.shields.io/pypi/v/shellmarks.svg\n :target: https://pypi.org/project/shellmarks\n :alt: This package on the Python Package Index\n\n.. image:: https://github.com/Josef-Friedrich/ansible-module-shellmarks/actions/workflows/tests.yml/badge.svg\n :target: https://github.com/Josef-Friedrich/ansible-module-shellmarks/actions/workflows/tests.yml\n :alt: Tests\n\nansible-module-shellmarks\n=========================\n\n``ansible-module-shellmarks`` is a `ansible <https://www.ansible.com>`_\nmodule to set bookmarks to commonly used directories like the tools\n`shellmarks <https://github.com/Bilalh/shellmarks>`_ /\n`bashmarks <https://github.com/huyng/bashmarks>`_ do.\n\n`shellmarks <https://github.com/Bilalh/shellmarks>`_ and\n`bashmarks <https://github.com/huyng/bashmarks>`_ are shell scripts\nthat allows you to save and jump to commonly used directories with tab\ncompletion.\n\nBoth tools store their bookmarks in a text file called ``~/.sdirs``.\nThis module is able to write bookmarks to this file.\n\n::\n\n export DIR_shell_scripts_SHELL_GITHUB=\"$HOME/shell-scripts\"\n export DIR_shellmarks_module_ansible=\"$HOME/ansible-module-shellmarks\"\n export DIR_skeleton_SHELL_GITHUB=\"$HOME/skeleton.sh\"\n\n.. code-block:: \n\n > SHELLMARKS (/etc/ansible/library/shellmarks.py)\n\n shellmarks https://github.com/Bilalh/shellmarks bashmarks\n https://github.com/huyng/bashmarks are shell scripts that\n allows you to save and jump to commonly used directories with\n tab completion.\n\n OPTIONS (= is mandatory):\n\n - cleanup\n Delete bookmarks of nonexistent directories.\n default: false\n\n - delete_duplicates\n Delete duplicate bookmark entries. This option deletes both\n duplicate mark and duplicate path entries. Entries at the\n beginning are deleted, entries at the end are perserved.\n default: false\n\n - export\n Command line string to export the bookmarks. The string %mark\n is replaced with the mark and %path is replaced with the path.\n For example 'autojump --add %path' or 'zoxide add %path'.\n default: null\n\n - export_query\n Command line string to query if the bookmark is already\n exported. The string %mark is replaced with the mark and %path\n is replaced with the path. For example 'zoxide query %path'.\n default: null\n\n - mark\n Name of the bookmark.\n aliases: [bookmark]\n default: null\n\n - path\n Full path to the directory.\n aliases: [src]\n default: null\n\n - replace_home\n Replace home directory with $HOME variable.\n default: true\n\n - sdirs\n The path to the file where the bookmarks are stored.\n default: ~/.sdirs\n\n - sorted\n Sort entries in the bookmark file.\n default: true\n\n - state\n State of the mark.\n aliases: [src]\n choices: [present, absent]\n default: present\n\n AUTHOR: Josef Friedrich (@Josef-Friedrich)\n\n METADATA:\n metadata_version: '1.0'\n status:\n - preview\n supported_by: community\n\n EXAMPLES:\n\n # Bookmark the ansible configuration directory\n - shellmarks:\n mark: ansible\n path: /etc/ansible\n state: present\n\n # Delete bookmark of the ansible configuration directory\n - shellmarks:\n mark: ansible\n path: /etc/ansible\n state: absent\n\n # Replace home directory with $HOME variable\n - shellmarks:\n replace_home: true\n\n # Sort entries in the bookmark file\n - shellmarks:\n sorted: true\n\n # Delete bookmarks of no longer existing directories\n - shellmarks:\n cleanup: true\n\n RETURN VALUES:\n - changes\n A list of actions\n returned: On changed\n sample: [{action: add, mark: dir1, path: /dir1}, {action: delete, mark: dir1, path: /dir1},\n {action: sort, reverse: false, sort_by: mark}, {action: cleanup, count: 1}]\n type: list\n\nDevelopment\n===========\n\nTest functionality\n------------------\n\n::\n\n /usr/local/src/ansible/hacking/test-module -m shellmarks.py -a\n\nTest documentation\n------------------\n\n::\n\n source /usr/local/src/ansible/hacking/env-setup\n /usr/local/src/ansible/test/sanity/validate-modules/validate-modules --arg-spec --warnings shellmarks.py\n\nGenerate documentation\n----------------------\n\n::\n\n ansible-doc -M . shellmarks\n",
"bugtrack_url": null,
"license": "GPL-3.0-only",
"summary": "shellmarks is a ansible module to set bookmarks to commonly used directories like the tools shellmarks and bashmarks do.",
"version": "3.0.0",
"project_urls": {
"Homepage": "https://github.com/Josef-Friedrich/ansible-module-shellmarks",
"Repository": "https://github.com/Josef-Friedrich/ansible-module-shellmarks"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "7dcee87063a815fd0e379b09c864aacea0303d5449c22b45104c381ba28fe5d0",
"md5": "a4f5cb74c358e83e54210b291718d4a6",
"sha256": "4965ff0911babd1e29ebf813fdc2138b3ddf35f5c71fb4d8f1262f51e5d8d5fa"
},
"downloads": -1,
"filename": "shellmarks-3.0.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "a4f5cb74c358e83e54210b291718d4a6",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.10,<4.0",
"size": 21656,
"upload_time": "2024-02-12T16:36:18",
"upload_time_iso_8601": "2024-02-12T16:36:18.084883Z",
"url": "https://files.pythonhosted.org/packages/7d/ce/e87063a815fd0e379b09c864aacea0303d5449c22b45104c381ba28fe5d0/shellmarks-3.0.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "233bac0c22dbafec4e60ba75e93fea573b19d1df0d65ab5a34cfef8d75a980a4",
"md5": "553bcf879d02138dec58627ffd69dbf8",
"sha256": "41701e9562a9fa66154008873e45e517845a1f8c04cf985708772ab53088e802"
},
"downloads": -1,
"filename": "shellmarks-3.0.0.tar.gz",
"has_sig": false,
"md5_digest": "553bcf879d02138dec58627ffd69dbf8",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.10,<4.0",
"size": 21239,
"upload_time": "2024-02-12T16:36:19",
"upload_time_iso_8601": "2024-02-12T16:36:19.868684Z",
"url": "https://files.pythonhosted.org/packages/23/3b/ac0c22dbafec4e60ba75e93fea573b19d1df0d65ab5a34cfef8d75a980a4/shellmarks-3.0.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-02-12 16:36:19",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "Josef-Friedrich",
"github_project": "ansible-module-shellmarks",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"tox": true,
"lcname": "shellmarks"
}