{"id":13638188,"url":"https://github.com/eugenesvk/xontrib-cd","last_synced_at":"2025-04-06T05:32:23.866Z","repository":{"id":57477936,"uuid":"340628252","full_name":"eugenesvk/xontrib-cd","owner":"eugenesvk","description":"'cd' to any path without escaping in xonsh shell: cd ~/[te] st","archived":false,"fork":false,"pushed_at":"2024-12-24T09:37:47.000Z","size":32,"stargazers_count":6,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-21T18:13:17.901Z","etag":null,"topics":["cli","command-line","terminal","xonsh","xontrib"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/eugenesvk.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":"2021-02-20T10:37:34.000Z","updated_at":"2024-12-24T09:37:50.000Z","dependencies_parsed_at":"2024-12-24T10:59:12.351Z","dependency_job_id":"b2c52dc6-7f57-41a1-b8b1-725a16116253","html_url":"https://github.com/eugenesvk/xontrib-cd","commit_stats":{"total_commits":32,"total_committers":1,"mean_commits":32.0,"dds":0.0,"last_synced_commit":"10b44fce85abe673a466629a96a753cb59aed7c7"},"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eugenesvk%2Fxontrib-cd","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eugenesvk%2Fxontrib-cd/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eugenesvk%2Fxontrib-cd/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eugenesvk%2Fxontrib-cd/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/eugenesvk","download_url":"https://codeload.github.com/eugenesvk/xontrib-cd/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247440632,"owners_count":20939223,"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":["cli","command-line","terminal","xonsh","xontrib"],"created_at":"2024-08-02T01:00:41.433Z","updated_at":"2025-04-06T05:32:23.531Z","avatar_url":"https://github.com/eugenesvk.png","language":"Python","funding_links":[],"categories":["Directory Navigation"],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n\u003ccode\u003ecd\u003c/code\u003e to any path without escaping in \u003ca href=\"https://xon.sh\"\u003exonsh shell\u003c/a\u003e.\n\u003cbr/\u003e\nReplaces \u003ccode\u003ecd \u003c/code\u003e at the start of a line with a \u003ca href=\"https://xon.sh/tutorial_macros.html#subprocess-macros\"\u003esubprocess macro\u003c/a\u003e \u003ccode\u003ecd! \u003c/code\u003e \n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e  \nIf you like the idea click ⭐ on the repo and stay tuned.\n\u003c/p\u003e\n\n\n## Install\n\n```xsh\nxpip install xontrib-cd\n# or: xpip install -U git+https://github.com/eugenesvk/xontrib-cd\n```\n\nThis xontrib will get loaded automatically for interactive sessions; to stop this, set\n\n```xonsh\n$XONTRIBS_AUTOLOAD_DISABLED = {\"cd\", }\n```\n\n## Configure\n\nSet the following environment variables in your profile to enable __extra options__ (disabled by default):\n\n  - `$XONTRIB_CD_ALTSYMLINKFLAG = True` to pass `-p`, `-f`, or `-s` flags (in addition to `-P`) to follow symlinks\n  - `$XONTRIB_CD_ALTSYMLINKFUNC = True` to use `cdp`, `cdf`, or `cds` (in addition to `cd -P`) to follow symlinks\n  - `$XONTRIB_CD_SYMLINKAlWAYSON = True` to make `cd` always follow symlinks (always pass `-P`)\n  - `$XONTRIB_CD_LASTCMD = True` to make `cd` also work when it's the last command in a multi-command line\n\n\n## Use\n\nUse `cd` as usual, but without the fear of copying\u0026pasting arbitrary paths (e.g. `.../space separated/` or `.../[bracketed]/`)\n\n```xsh\nxontrib load cd\ncd ~/[Path] With Spaces\t# equivalent to 'cd! ~/[Path] With Spaces'\ncd C:/Program Files    \t# equivalent to 'cd! C:/Program Files'\ncd -P ~/SymlinkTo      \t# follow symlinks, equivalent to 'cd -P! ~/SymlinkTo'\n```\n\nAdd a space before ` cd` to disable adding `!`\n\n## Known issues\n\n- Xontrib autoload can't be disabled and prevents user configured environment vars from being read on time due to a [xonsh bug](https://github.com/xonsh/xonsh/issues/5020), so if you want to change the default configs via env vars, install the deauto branch `xpip install -U git+https://github.com/eugenesvk/xontrib-cd@deauto`\n- Multiple commands per line like `cd ~; echo 1` will fail since `cd` is replaced with `cd!`, and everything after `!` is treated as a single string argument, ignoring the `;` separators\n- But `echo 1; cd ~` will work with `$XONTRIB_CD_LASTCMD`\n\n## Credits\n\nThis package was created with [xontrib cookiecutter template](https://github.com/xonsh/xontrib-cookiecutter) based on the idea of hooking into the command line input as implemented in [xontrib-sh](https://github.com/anki-code/xontrib-sh)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feugenesvk%2Fxontrib-cd","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feugenesvk%2Fxontrib-cd","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feugenesvk%2Fxontrib-cd/lists"}