{"id":15355933,"url":"https://github.com/fibo/dir","last_synced_at":"2025-04-15T06:38:09.578Z","repository":{"id":53776491,"uuid":"77960537","full_name":"fibo/dir","owner":"fibo","description":"create a folder and enter into it","archived":false,"fork":false,"pushed_at":"2022-08-25T11:38:51.000Z","size":5,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-28T17:11:12.300Z","etag":null,"topics":["mkdir"],"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/fibo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-01-03T22:59:17.000Z","updated_at":"2024-07-06T12:31:47.000Z","dependencies_parsed_at":"2022-08-25T18:21:17.747Z","dependency_job_id":null,"html_url":"https://github.com/fibo/dir","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fibo%2Fdir","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fibo%2Fdir/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fibo%2Fdir/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fibo%2Fdir/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fibo","download_url":"https://codeload.github.com/fibo/dir/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249023505,"owners_count":21199955,"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":["mkdir"],"created_at":"2024-10-01T12:26:21.049Z","updated_at":"2025-04-15T06:38:09.558Z","avatar_url":"https://github.com/fibo.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# dir\n\n\u003e create a folder and enter into it\n\n[Installation](#installation) |\n[Usage](#usage) |\n[Annotated source](#annotated-source) |\n[License](#license)\n\n[![KLP](https://fibo.github.io/svg/klp-badge.svg)](https://fibo.github.io/kiss-literate-programming)\n\n## Installation\n\nBoth *zsh* and *bash* shell are supported.\n\nJust copy and paste the `dir` function below in your shell profile or (assuming you are using zsh) do something like\n\n```sh\nmkdir -p ~/.shell\ncd ~/.shell\ngit clone https://github.com/fibo/dir.git\necho \"source ~/.shell/dir/fun.sh\" \u003e\u003e ~/.zshrc\n```\n\nWith the setup above, to update run the following\n\n```sh\ncd ~/.shell/dir\ngit pull origin main\nsource ~/.zshrc\ncd -\n```\n\n## Usage\n\nSimple as\n\n```sh\ndir /path/to/my/folder\n```\n\nFolder `/path/to/my/folder` will be created and you will enter into it.\nYou can use an absolute path like the example above or a relative path like\n\n```sh\ndir folder/i/want/to/create\n```\n\nAre folder names with spaces supported? **Yes!**\n\n```sh\ndir ~/you can/create folders/with spaces\n```\n\n## Annotated source\n\nIf `-h` or `--help` is the first parameter or no argument is provided, then output *USAGE*.\n\nUse `mkdir` to create given folder and *change directory* into it.\n\n\n    dir() {\n    \tUSAGE=\"USAGE: dir foo/bar\"\n\n    \t[ \"$1\" = \"-h\" ] \u0026\u0026 echo $USAGE \u0026\u0026 return\n    \t[ \"$1\" = \"--help\" ] \u0026\u0026 echo $USAGE \u0026\u0026 return\n\n    \tif [ $# -gt 0 ]\n    \tthen\n    \t\tmkdir -p \"$*\" \u0026\u0026 cd \"$_\"\n    \telse\n    \t\techo $USAGE\n    \tfi\n    }\n\n## License\n\n[MIT](https://fibo.github.io/mit-license)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffibo%2Fdir","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffibo%2Fdir","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffibo%2Fdir/lists"}