{"id":27290949,"url":"https://github.com/kabeep/git-short-dir-prompt","last_synced_at":"2026-02-04T09:01:42.399Z","repository":{"id":216277176,"uuid":"740897783","full_name":"kabeep/git-short-dir-prompt","owner":"kabeep","description":"Focus on the development of the current repository by using a concise repository path in the command line prompt.","archived":false,"fork":false,"pushed_at":"2024-10-21T03:22:52.000Z","size":38,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-10-21T06:29:59.338Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Shell","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/kabeep.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":"2024-01-09T09:45:50.000Z","updated_at":"2024-10-21T03:22:55.000Z","dependencies_parsed_at":"2024-01-15T08:01:30.893Z","dependency_job_id":null,"html_url":"https://github.com/kabeep/git-short-dir-prompt","commit_stats":null,"previous_names":["kabeep/git-short-dir-prompt"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kabeep%2Fgit-short-dir-prompt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kabeep%2Fgit-short-dir-prompt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kabeep%2Fgit-short-dir-prompt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kabeep%2Fgit-short-dir-prompt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kabeep","download_url":"https://codeload.github.com/kabeep/git-short-dir-prompt/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248485757,"owners_count":21111920,"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":[],"created_at":"2025-04-11T21:39:42.468Z","updated_at":"2026-02-04T09:01:37.345Z","avatar_url":"https://github.com/kabeep.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003e git-short-dir-prompt \u003c/h1\u003e\n\u003cp align=\"center\"\u003e\n  \u003cb\u003eA Bash script to simplify Git working directory paths for enhanced efficiency and focus in the command line\u003c/b\u003e\n\u003c/p\u003e\n\n---\n\n\u003cdiv align=\"center\"\u003e\n\n![Linux](https://img.shields.io/badge/Linux-support-lightseagreen?logo=linux)\n![Windows](https://img.shields.io/badge/Windows-support-cornflowerblue?logo=windows)\n![MacOS](https://img.shields.io/badge/MacOS-support-salmon?logo=apple)\n[![Version](https://img.shields.io/badge/Version-1.0.0-slateblue?logo=powershell)](CHANGELOG.md)\n[![License](https://img.shields.io/badge/License-MIT-yellowgreen)](LICENSE)\n\nEnglish | [简体中文](README.zh-CN.md)\n\n\u003c/div\u003e\n\n## 📖 Features\n\n`git-short-dir-prompt` is a script designed for the Bash shell environment, based on the concept of [git-prompt.sh](https://github.com/git/git/blob/master/contrib/completion/git-prompt.sh). It displays a concise directory path within Git repositories.\n\nIt aims to enhance work efficiency and focus in the command line, especially suitable for developers who need to navigate quickly through complex directory structures.\n\n\u003e It helps you:\n\u003e\n\u003e - Automatically detect if the current directory is a Git repository, not just initialized\n\u003e\n\u003e - Hide lengthy working directory paths in Git directories\n\u003e\n\u003e - Simplify paths to clearly point to the user and GitHub repository address\n\u003e \n\u003e - Resolved the issue of case insensitivity on Windows\n\n#### Default Command Line Prompt\n\n![default_prompt](images/default_prompt.png)\n\n#### Simplified Command Line Prompt\n\n![simplified_prompt](images/simplified_prompt.png)\n\n## ⚙️ Installation\n\n1. Clone the repository\n\n```shell\ngit clone https://github.com/kabeep/git-short-dir-prompt.git\n```\n\n2. Enter the project directory\n\n```shell\ncd git-short-dir-prompt\n```\n\n3. Execute the installer\n\n```shell\n./install.sh\n```\n\n4. Edit `.bash_profile` to call during initialization\n\n```shell\nvim ~/.bash_profile\n\n### .bash_profile\n# change your username\nPS1=\"$PS1\"'username'                    # username\n# change your hostname\nPS1=\"$PS1\"'@hostname '                  # hostname\n```\n\n5. Load `.bash_profile` or Restart Terminal\n\n```shell\nsource ~/.bash_profile\n```\n\n## 🚀 Usage\n\nOnce installed and configured, when you enter a Git repository directory, the command line prompt will automatically update to display a simplified directory path.\n\n## 🤝 Contribution\n\nContributions via Pull Requests or [Issues](https://github.com/kabeep/git-short-dir-prompt/issues) are welcome.\n\n## 📄 License\n\nThis project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkabeep%2Fgit-short-dir-prompt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkabeep%2Fgit-short-dir-prompt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkabeep%2Fgit-short-dir-prompt/lists"}