{"id":17432104,"url":"https://github.com/0mp/goat","last_synced_at":"2026-01-27T23:43:36.528Z","repository":{"id":82148938,"uuid":"53276435","full_name":"0mp/goat","owner":"0mp","description":"POSIX-compliant shell movement boosting hack for real ninjas (aka `cd x` and `cd  ...`)","archived":false,"fork":false,"pushed_at":"2023-10-02T15:45:18.000Z","size":133,"stargazers_count":38,"open_issues_count":1,"forks_count":5,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-01-01T00:33:43.839Z","etag":null,"topics":["bash","cd","hack","posix","posix-compliant","posix-sh","productivity","sh","shell","terminal","utility"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/0mp.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2016-03-06T21:11:51.000Z","updated_at":"2024-11-01T18:09:09.000Z","dependencies_parsed_at":"2023-03-01T02:30:45.399Z","dependency_job_id":"5e65ecd7-e119-4ba0-afcd-1714765921d8","html_url":"https://github.com/0mp/goat","commit_stats":null,"previous_names":[],"tags_count":21,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0mp%2Fgoat","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0mp%2Fgoat/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0mp%2Fgoat/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0mp%2Fgoat/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/0mp","download_url":"https://codeload.github.com/0mp/goat/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239946867,"owners_count":19723012,"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":["bash","cd","hack","posix","posix-compliant","posix-sh","productivity","sh","shell","terminal","utility"],"created_at":"2024-10-17T08:24:07.649Z","updated_at":"2026-01-27T23:43:36.501Z","avatar_url":"https://github.com/0mp.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# goat\n\n### Overview\n\n\u003e I used to retrieve carefully-constructed `cd` commands from my history. \n\u003e But then, I got a goat.\n\u003e\n\u003e _~\u0026#32;[Jonathan Paugh][jpaugh] on [Google+]_\n\n```console\n[ ~/Pictures ] $ goat dev ~/Documents/devel # create a link to the dev directory\n[ ~/Pictures ] $ ls # see that there is no ~/Pictures/dev directory here\nseahorses wallpapers\n[ ~/Pictures ] $ cd dev # the goat framework's got you covered!\n[ ~/Documents/devel ] $\n```\n\n\u003e Oh my! This is a **POSIX-compliant** shell _movement boosting_ **hack** for\n\u003e **real ninjas**.\u003cbr\u003e\n\u003e #[posix\\_me\\_harder][posix_me_harder] #[posixly\\_correct][posixly_correct]\n\u003e\n\u003e _~\u0026#32;0mp_\n\nSometimes you jump around your filesystem tree a lot and you end up putting a\ncouple of ugly aliases into your shell's rc file.\n\n\u003e I should try it, even if it is dumb!\n\u003e\n\u003e _~\u0026#32;[dse] on [What the Daily WTF?] about goat v1.1.1_\n\nWith goat you can easily manage your ninja shortcuts - just type `goat p\n~/Projects` to introduce a new link and then `cd p` to jump to its destination.\n\n\u003e Rad! I can do `cd ....` now instead of performing a horse galloping-like\n\u003e waltz with `../` being my miserable dance floor. I'm cloning this goat\n\u003e straight away!\n\u003e\n\u003e _~\u0026#32;YA0mp_\n\nBTW, Bash completion is now fully working with goat's shortcuts.\n\n## Building\n\n```console\n$ make all\n```\n\n## Installation\n\n```console\n$ make install\n```\n\nAferwards:\n\n- Make sure that `~/.local/bin` is in your `PATH`:\n\n  ```console\n  $ cat \u003c\u003c'EOF' \u003e\u003e ~/.bashrc\n  case \"$PATH\" in\n      *$HOME/.local/bin*) ;;\n      *) PATH=\"$HOME/.local/bin:$PATH\" ;;\n  esac\n  EOF\n  ```\n\n- Make sure that files inside `~/.local/etc/bash_completion.d` are actually\n  sourced by the Bash completion library:\n\n  ```console\n  $ cat \u003c\u003c'EOF' \u003e\u003e ~/.bash_completion\n  if [[ -d ~/.bash_completion.d ]]\n  then\n      for f in ~/.local/etc/bash_completion.d/*\n      do\n          [[ -f $f ]] \u0026\u0026 source \"$f\"\n      done\n  fi\n  EOF\n  ```\n\n## Usage overview\n\n```console\nCreate a shortcut named “f” to ~/Documents/dev/freebsd (no need to use\nthe link command explicitly here):\n\n      $ goat f ~/Documents/dev/freebsd\n\nFollow a link to change a directory with cd(1):\n\n      $ cd f\n\nTake the “f” shortcut and enter its destination subdirectory with just\none command:\n\n      $ pwd\n      /home/0mp\n      $ cd f/ports\n      $ pwd\n      /usr/home/0mp/freebsd/ports\n\nCreate a shortcut named “p” to the current directory:\n\n      $ goat p .\n\nGo up the filesystem tree with ... (same as the standard “cd ../../”):\n\n      $ cd ...\n\nList all your links:\n\n      $ goat list\n      dots    -\u003e      /usr/home/0mp/.dotfiles\n      down    -\u003e      /usr/home/0mp/Downloads\n      f       -\u003e      /usr/home/0mp/freebsd\n      p       -\u003e      /usr/home/0mp/freebsd/ports\n      pa      -\u003e      /usr/home/0mp/freebsd/patches\n      src     -\u003e      /usr/home/0mp/freebsd/svn/src\n      svn     -\u003e      /usr/home/0mp/freebsd/svn\n\nDelete a link (or more):\n\n      $ goat delete f p\n\nDelete all the links which point to directories with the given prefix:\n\n      $ goat deleteprefix \"$HOME/Documents\"\n```\n\n## License\n\nLicensed under 2-Clause BSD license. Copyright \u0026#169; 2016-2021 Mateusz Piotrowski\n\n[posix_me_harder]: http://wiki.wlug.org.nz/POSIX_ME_HARDER\n[posixly_correct]: http://wiki.wlug.org.nz/POSIXLY_CORRECT\n[dse]: https://what.thedailywtf.com/user/dse\n[What the Daily WTF?]: https://what.thedailywtf.com/topic/16122/quick-links-thread/2121\n[Google+]: https://plus.google.com/113949504369826627206/posts/bqSfYTrQxLN\n[jpaugh]: https://github.com/jpaugh\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F0mp%2Fgoat","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F0mp%2Fgoat","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F0mp%2Fgoat/lists"}