{"id":33185541,"url":"https://github.com/ClaasBontus/qcd_rs","last_synced_at":"2025-11-17T10:01:37.452Z","repository":{"id":192889633,"uuid":"687692712","full_name":"ClaasBontus/qcd_rs","owner":"ClaasBontus","description":"Command line tool for quickly changing directories","archived":false,"fork":false,"pushed_at":"2023-09-05T20:24:37.000Z","size":17,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-30T12:40:24.427Z","etag":null,"topics":["chdir","command-line","linux","rust"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ClaasBontus.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2023-09-05T20:03:35.000Z","updated_at":"2024-05-28T01:45:40.000Z","dependencies_parsed_at":"2023-09-05T20:44:15.982Z","dependency_job_id":null,"html_url":"https://github.com/ClaasBontus/qcd_rs","commit_stats":null,"previous_names":["claasbontus/qcd_rs"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ClaasBontus/qcd_rs","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ClaasBontus%2Fqcd_rs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ClaasBontus%2Fqcd_rs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ClaasBontus%2Fqcd_rs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ClaasBontus%2Fqcd_rs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ClaasBontus","download_url":"https://codeload.github.com/ClaasBontus/qcd_rs/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ClaasBontus%2Fqcd_rs/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":284861038,"owners_count":27075155,"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","status":"online","status_checked_at":"2025-11-17T02:00:06.431Z","response_time":55,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["chdir","command-line","linux","rust"],"created_at":"2025-11-16T05:00:20.094Z","updated_at":"2025-11-17T10:01:37.447Z","avatar_url":"https://github.com/ClaasBontus.png","language":"Rust","funding_links":[],"categories":["\u003ca name=\"cd\"\u003e\u003c/a\u003eDirectory changers (alternatives to cd)"],"sub_categories":[],"readme":"# qcd \u0026ndash; quickly change directory\n\n\n**qcd** is a Linux tool which helps improving your efficiency on the command line. With qcd\nyou change to another directory just by entering commands like `qcd 3` and step\nback to where you came from with `qcd -o`. Or you toggle between two directories with\nthe swap functionality (`qcd -w`).\n\nFor this to work you store frequently visited directories in a database file (sqlite3).\nEntries in this database get referred to via indices (value '3' in the example).\nIf you don't like remembering indices you can assign aliases to each entry. Indices and\naliases can be freely adjusted to your needs.\n\nIn addition `qcd` provides a stack concept. In the example (`qcd 3`) the\ncurrent working directory is put on (top of) the stack before changing the directory.\nEntering `qcd -o` pops (removes) the path from top of the stack and changes the working\ndirectory to that path.\n\nEnter `qcd -h` to see the full help.\n\n# Usage examples\n## Change directory\n\n    qcd ENTRY [-n]  Chdir to path with idx or alias ENTRY (w/o -n: adds work dir to stack)\n    qcd -o          (pop)  Chdir to top of stack, remove that entry from stack\n\n## Add or remove an entry\n\n    qcd -a PATH [-i IDX] [-s ALIAS]   Add PATH to database\n    qcd -p [-i IDX] [-s ALIAS]        Add current working directory to database\n    qcd -r ENTRY                      Remove row with idx or alias ENTRY\n    qcd -u                            (push) Add current working directory to (top of) stack\n\n## Queries\n\n    qcd -l          List all indexes, aliases and paths\n    qcd -q PATH     Query index of PATH\n    ls `qcd -e 4`   List directory contents of path with idx 4\n\n## Alias matching\nYour choices of alias names can have an influence on your efficiency. Abbreviating an alias\nwill match if the string equals the beginning of an alias in a unique way. For instance,\nwith aliases *pets* and *people* in the database `qcd pet` will match the first one while\n`qcd pe` will match none. If there is a single alias starting e.g. with letter 'a'\n`qcd a` will already do the job.\n\n\n# Obtaining qcd\n## Building qcd from source files\nYou need a Linux system with [Rust](https://www.rust-lang.org/tools/install) \ninstalled. Change to a convenient directory and enter\n\n    git clone https://github.com/ClaasBontus/qcd_rs.git\n    cd qcd_rs\n    cargo build --release\n\nAfter a successful build you should find the executable (named `qcd_rs`) in\nsubdirectory target/release/.\n\n\n## Installation\nIt is **not sufficient** to copy the qcd-binary to a directory in your search path\n([read this](https://stackoverflow.com/a/64617878/3876684]) if you want to know why).\n\n1. Copy qcd_rs to a directory in your PATH (or use the full path specification to qcd_rs in the code below).\n2. Add the following code to your `.bashrc` or `.zshrc` file:\n\n```bash\nqcdfunc()\n{\n  d=`qcd_rs \"$@\"`\n  if (( $? ))\n  then\n    \\builtin echo $d\n  else\n    \\builtin cd $d\n  fi\n}\n\nalias qcd=qcdfunc\nexport QCD_RS_SESSIONID=`qcd_rs --pid`\n```\n\n# Environment variables\n- QCD_RS_DBPATH: Path to sqlite database (default: *home-directory*).\n- QCD_RS_DBNAME: Name of sqlite database file (default: .qcd_rs.sqlite).\n- QCD_RS_SESSIONID: Process ID. Needed for providing a separate stack for each opened shell.\n\n\n# Remarks\n- qcd prevents duplicate entries on top of stack.\n- Old entries on stack (older than 21 days) eventually get removed.\n- Support is restricted to [UTF-8 paths](https://github.com/camino-rs/camino).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FClaasBontus%2Fqcd_rs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FClaasBontus%2Fqcd_rs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FClaasBontus%2Fqcd_rs/lists"}