{"id":15209494,"url":"https://github.com/ybda/shmarks","last_synced_at":"2025-10-03T17:39:38.088Z","repository":{"id":214879408,"uuid":"735259573","full_name":"ybda/shmarks","owner":"ybda","description":"Directory bookmarks for the shell","archived":false,"fork":false,"pushed_at":"2024-04-26T12:44:37.000Z","size":128,"stargazers_count":2,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-04-26T13:44:47.219Z","etag":null,"topics":["autocomplete","cli-app","cli-tool","rust","shell","tool","zsh"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ybda.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-12-24T08:54:11.000Z","updated_at":"2024-06-16T08:47:32.565Z","dependencies_parsed_at":null,"dependency_job_id":"db75a68b-c18d-4572-b9bc-fc29c29cc91b","html_url":"https://github.com/ybda/shmarks","commit_stats":null,"previous_names":["ybda/shmarks"],"tags_count":14,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ybda%2Fshmarks","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ybda%2Fshmarks/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ybda%2Fshmarks/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ybda%2Fshmarks/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ybda","download_url":"https://codeload.github.com/ybda/shmarks/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":238840731,"owners_count":19539602,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["autocomplete","cli-app","cli-tool","rust","shell","tool","zsh"],"created_at":"2024-09-28T07:40:26.292Z","updated_at":"2025-10-03T17:39:33.056Z","avatar_url":"https://github.com/ybda.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003eshmarks - a fast, easy, robust and convenient way of handling bookmarks of directories\u003c/h1\u003e\n\u003cdiv align=\"center\"\u003e\n\n[![crates.io][crates.io-badge]][crates.io]\n\nCreate, remove, view sorted (by bookmark names of directory paths) bookmarks of your favorite directories\n\u003c/div\u003e\n\n\u003cdiv align=\"center\"\u003e\n\n![Example-Screenshot][example-screenshot]\n\n\u003c/div\u003e\n\n## Installation\n\n1. **Install binary**\n\n    ```bash\n    \u003e cargo install shmarks --locked\n    ```\n\n2. **Add code in your .zshrc** (should work with little changes in other shells as well)\n\n    Adding this into your directory of plugins might be a more clean option (include in .zshrc with `source plugins_dir/shmarks.zsh`)\n\n    ```bash\n    export SHMARKS_LIST_PATH=\"$HOME/.local/share/shmarks.toml\" # place where your shell bookmarks (shmarks) stored\n    export SHMARKS_AUTO_SORT=\"d\" # sort on adding new alias: a = by aliases, d = by directories, otherwise no sorting\n    export SHMARKS_DEFAULT_ALIAS=\"dd\" # default alias to jump into if no alias name was provided\n    \n    # Jump by alias\n    f() {\n        if [[ $# -eq 0 ]]; then\n            # jump to default dir if no arguments provided\n            cd \"$(shmarks -a \"$SHMARKS_DEFAULT_ALIAS\")\"\n        else\n            cd \"$(shmarks -a \"$@\")\"\n        fi\n    }\n    \n    # Might be interesting to you\n\n    alias s='shmarks' # shortcut for 'shmarks' binary\n    alias p='shmarks ls -d' # colored list print with directories\n    alias se=\"$EDITOR \"$SHMARKS_LIST_PATH\"\" # edit shmarks\n    alias pf='shmarks ls -d | rg'  # find in print of directories\n\n    # fzf jumper\n    sf() {\n        local choice=\"$(shmarks ls -dp | fzf)\"\n    \n        if [ -n \"$choice\" ]; then\n            local dir=\"$(echo \"$choice\" | awk '{print $2}')\"\n            cd \"$dir\"\n        fi\n    }\n\n    # Autocompletion of alias\n    _shmarks_compzsh() {\n        reply=($(shmarks ls))\n    }\n    compctl -K _shmarks_compzsh f # change 'f' to alias set for jumping (6th line)\n    ```\n\n    For PowerShell:\n\n    ```powershell\n    # Jump by alias\n    function f($aliasName) {\n\t    if (!$aliasName) {\n            # Jump to default dir if no arguments provided\n            Set-Location (shmarks -a $env:SHMARKS_DEFAULT_ALIAS)\n        } else {\n            # Jump to directory based on alias argument\n            Set-Location (shmarks -a $aliasName)\n        }\n    }\n    ```\n\n## Usage\n```bash\n\u003e shmarks\nDirectory bookmarks for the shell.\n\nUsage: shmarks [OPTIONS]\n       shmarks \u003cCOMMAND\u003e\n\nCommands:\n  new   Create new mark. Creates mark for current directory by default [aliases: n]\n  rm    Remove mark. Removes mark of current dir if no args provided [aliases: r]\n  ls    List all marks [aliases: l]\n  sort  Sort shmarks file [aliases: s]\n  help  Print this message or the help of the given subcommand(s)\n\nOptions:\n  -a, --alias \u003cALIAS\u003e  Alias of the directory to jump into\n  -h, --help           Print help\n  -V, --version        Print version\n```\n\nJump by alias 'default' into default dir\n\n```bash\n\u003e f\n```\n\nJump by alias\n\n```bash\n\u003e f myalias\n```\n\nEdit marks file in $EDITOR\n\n```bash\n\u003e se\n```\n\nSave current dir (pwd) to shmarks and sort shmarks file if $SHMARKS_AUTO_SORT was set\n\n```bash\n\u003e shmarks new myalias\n```\n\n```bash\n\u003e s n myalias\n```\n\nSave specified dir to shmarks\n\n```bash\n\u003e shmarks new myalias /my/dir\n```\n\nRemove current dir from shmarks\n\n```bash\n\u003e shmarks rm\n```\n\nRemove alias specified by its directory path\n\n```bash\n\u003e shmarks rm -d /my/dir\n```\n\nRemove alias specified by its name\n\n```bash\n\u003e shmarks rm -a myalias\n```\n\nList all saved marks like plain GNU \"ls\" utility\n\n```bash\n\u003e shmarks ls \n```\n\nList all saved marks like \"/bin/ls -l\" in columns with dirs showed, colored\n\n```bash\n\u003e shmarks ls -d\n```\n\n```bash\n\u003e p\n```\n\nSort shmarks by directories (alphabetical order)\n\n```bash\n\u003e shmarks sort -d\n```\n\n### Note\n- By default, shmarks.toml located in $XDG_DATA_HOME or $HOME/.local/share. You could override it with $SHMARKS_LIST_PATH\n\n### Inspired by\n- [huyng/bashmarks][huyng/bashmarks]\n\n[crates.io-badge]: https://img.shields.io/crates/v/shmarks?logo=rust\u0026logoColor=white\u0026style=flat-square\n[crates.io]: https://crates.io/crates/shmarks\n[huyng/bashmarks]: https://github.com/huyng/bashmarks\n[example-screenshot]: https://i.imgur.com/m0eYZA8.png","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fybda%2Fshmarks","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fybda%2Fshmarks","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fybda%2Fshmarks/lists"}