selecta


Nameselecta JSON
Version 0.2.1 PyPI version JSON
download
home_page
SummaryInteractively select an entry from your bash/zsh history.
upload_time2023-12-17 09:01:51
maintainer
docs_urlNone
author
requires_python>=3.9
licenseThe MIT License (MIT) Copyright (c) 2016 Thomas Schüßler Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
keywords bash zsh curses history
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            selecta - Interactively search and select entries from your bash/zsh history.
-----------------------------------------------------------------------------

[![Python package](https://github.com/vindolin/selecta/actions/workflows/python-package.yml/badge.svg?branch=master)](https://github.com/vindolin/selecta/actions/workflows/python-package.yml)

This is a Python3 clone of François Fleuret's excellent [selector](https://fleuret.org/cgi-bin/gitweb/gitweb.cgi?p=selector.git;a=summary) tool.

[![Screencast](https://raw.githubusercontent.com/vindolin/selecta/master/screencast.gif)](https://raw.githubusercontent.com/vindolin/selecta/master/screencast.gif)


Usage
=====
Just type some characters and see which entries match your words.

You can search for whole sentences by prefixing your search with a double quote.

Use <kbd>up</kbd> and <kbd>down</kbd> arrows to navigate the list.

<kbd>Escape</kbd>/<kbd>Backspace</kbd> on the result list returns to the search input.

<kbd>Escape</kbd> on the search input closes selecta.

Press <kbd>Enter</kbd> to copy the selected entry to the console.

<kbd>CTRL+a</kbd> toggles case sensitivity

<kbd>CTRL+r</kbd> toggles regex search

Installation
============

```console
pip install selecta
```
Install the keyboard shortcut ALT+{key}:

```console
selecta_add_keybinding {the alt key you want to use}
```

This will append one of the following lines to your ~/.bashrc/zshrc:

```console
bind -x '"\C-[{key}":"\selecta --bash -y <(history)"'
bindkey -s "^[{key}" "selecta --zsh -y <(history)^M"
```

Upgrade from older version to 0.2.x
-----------------------------------
Delete your old keybinding from .bashrc/.zshrc and register the new version with:
```console
selecta_add_keybinding
```


--help output
-------------

```
    usage: selecta [-h] [-i] [-b] [-z] [-e] [-a] [-d] [-y] [--bash] [--zsh]
                   [infile]

    positional arguments:
      infile                the file which lines you want to select eg. <(history)

    optional arguments:
      -h, --help            show this help message and exit
      -i, --reverse-order   reverse the order of the lines
      -b, --remove-bash-prefix
                            remove the numeric prefix from bash history
      -z, --remove-zsh-prefix
                            remove the time prefix from zsh history
      -e, --regexp          start in regexp mode
      -a, --case-sensitive  start in case-sensitive mode
      -d, --remove-duplicates
                            remove duplicated lines
      -y, --show-matches    highlight the part of each line which matches the
                            substrings or regexp
      --bash                standard for bash history search, same as -b -i -d
      --zsh                 standard for zsh history search, same as -b -i -d
```

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "selecta",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.9",
    "maintainer_email": "",
    "keywords": "bash,zsh,curses,history",
    "author": "",
    "author_email": "Thomas Sch\u00fc\u00dfler <vindolin@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/3c/62/e7550541f894d00fbd8c4c99b91e0822b896c80cf46429766e299a8dcdb9/selecta-0.2.1.tar.gz",
    "platform": null,
    "description": "selecta - Interactively search and select entries from your bash/zsh history.\n-----------------------------------------------------------------------------\n\n[![Python package](https://github.com/vindolin/selecta/actions/workflows/python-package.yml/badge.svg?branch=master)](https://github.com/vindolin/selecta/actions/workflows/python-package.yml)\n\nThis is a Python3 clone of Fran\u00e7ois Fleuret's excellent [selector](https://fleuret.org/cgi-bin/gitweb/gitweb.cgi?p=selector.git;a=summary) tool.\n\n[![Screencast](https://raw.githubusercontent.com/vindolin/selecta/master/screencast.gif)](https://raw.githubusercontent.com/vindolin/selecta/master/screencast.gif)\n\n\nUsage\n=====\nJust type some characters and see which entries match your words.\n\nYou can search for whole sentences by prefixing your search with a double quote.\n\nUse <kbd>up</kbd> and <kbd>down</kbd> arrows to navigate the list.\n\n<kbd>Escape</kbd>/<kbd>Backspace</kbd> on the result list returns to the search input.\n\n<kbd>Escape</kbd> on the search input closes selecta.\n\nPress <kbd>Enter</kbd> to copy the selected entry to the console.\n\n<kbd>CTRL+a</kbd> toggles case sensitivity\n\n<kbd>CTRL+r</kbd> toggles regex search\n\nInstallation\n============\n\n```console\npip install selecta\n```\nInstall the keyboard shortcut ALT+{key}:\n\n```console\nselecta_add_keybinding {the alt key you want to use}\n```\n\nThis will append one of the following lines to your ~/.bashrc/zshrc:\n\n```console\nbind -x '\"\\C-[{key}\":\"\\selecta --bash -y <(history)\"'\nbindkey -s \"^[{key}\" \"selecta --zsh -y <(history)^M\"\n```\n\nUpgrade from older version to 0.2.x\n-----------------------------------\nDelete your old keybinding from .bashrc/.zshrc and register the new version with:\n```console\nselecta_add_keybinding\n```\n\n\n--help output\n-------------\n\n```\n    usage: selecta [-h] [-i] [-b] [-z] [-e] [-a] [-d] [-y] [--bash] [--zsh]\n                   [infile]\n\n    positional arguments:\n      infile                the file which lines you want to select eg. <(history)\n\n    optional arguments:\n      -h, --help            show this help message and exit\n      -i, --reverse-order   reverse the order of the lines\n      -b, --remove-bash-prefix\n                            remove the numeric prefix from bash history\n      -z, --remove-zsh-prefix\n                            remove the time prefix from zsh history\n      -e, --regexp          start in regexp mode\n      -a, --case-sensitive  start in case-sensitive mode\n      -d, --remove-duplicates\n                            remove duplicated lines\n      -y, --show-matches    highlight the part of each line which matches the\n                            substrings or regexp\n      --bash                standard for bash history search, same as -b -i -d\n      --zsh                 standard for zsh history search, same as -b -i -d\n```\n",
    "bugtrack_url": null,
    "license": "The MIT License (MIT)  Copyright (c) 2016 Thomas Sch\u00fc\u00dfler  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:  The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.  ",
    "summary": "Interactively select an entry from your bash/zsh history.",
    "version": "0.2.1",
    "project_urls": {
        "Changelog": "https://github.com/vindolin/selecta/blob/master/CHANGELOG.md",
        "Homepage": "https://github.com/vindolin/selecta"
    },
    "split_keywords": [
        "bash",
        "zsh",
        "curses",
        "history"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "0a59865fee4cd3a619c2792bc7f58d2a873331819ec71c4d75f1eaa4a15445d8",
                "md5": "3108cd63e83db22e98f3af5c7ae3dd0a",
                "sha256": "1e7496c9725e6f1e9330ec41338a3f37d38650abf33989f3f610e96658057cd8"
            },
            "downloads": -1,
            "filename": "selecta-0.2.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "3108cd63e83db22e98f3af5c7ae3dd0a",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.9",
            "size": 10160,
            "upload_time": "2023-12-17T09:01:49",
            "upload_time_iso_8601": "2023-12-17T09:01:49.934564Z",
            "url": "https://files.pythonhosted.org/packages/0a/59/865fee4cd3a619c2792bc7f58d2a873331819ec71c4d75f1eaa4a15445d8/selecta-0.2.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "3c62e7550541f894d00fbd8c4c99b91e0822b896c80cf46429766e299a8dcdb9",
                "md5": "881cc5ef191f17889e7f6afbf1560da4",
                "sha256": "760b618fd294ec85accb1d8e64c7fb44c84c2b6361b1f34f530dc4c10bad28b5"
            },
            "downloads": -1,
            "filename": "selecta-0.2.1.tar.gz",
            "has_sig": false,
            "md5_digest": "881cc5ef191f17889e7f6afbf1560da4",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.9",
            "size": 11505,
            "upload_time": "2023-12-17T09:01:51",
            "upload_time_iso_8601": "2023-12-17T09:01:51.630853Z",
            "url": "https://files.pythonhosted.org/packages/3c/62/e7550541f894d00fbd8c4c99b91e0822b896c80cf46429766e299a8dcdb9/selecta-0.2.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-12-17 09:01:51",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "vindolin",
    "github_project": "selecta",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [],
    "lcname": "selecta"
}
        
Elapsed time: 0.15311s