{"id":18343608,"url":"https://github.com/uasi/zsh-context-sensitive-alias","last_synced_at":"2025-04-06T07:32:47.317Z","repository":{"id":2990065,"uuid":"4006462","full_name":"uasi/zsh-context-sensitive-alias","owner":"uasi","description":"Context-sensitive alias for Zsh","archived":false,"fork":false,"pushed_at":"2012-11-06T03:06:39.000Z","size":97,"stargazers_count":22,"open_issues_count":0,"forks_count":0,"subscribers_count":4,"default_branch":"master","last_synced_at":"2023-04-14T01:31:04.823Z","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":"unlicense","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/uasi.png","metadata":{"files":{"readme":"README.markdown","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}},"created_at":"2012-04-12T15:59:29.000Z","updated_at":"2016-02-07T11:59:15.000Z","dependencies_parsed_at":"2022-08-30T23:50:18.576Z","dependency_job_id":null,"html_url":"https://github.com/uasi/zsh-context-sensitive-alias","commit_stats":null,"previous_names":[],"tags_count":0,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uasi%2Fzsh-context-sensitive-alias","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uasi%2Fzsh-context-sensitive-alias/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uasi%2Fzsh-context-sensitive-alias/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uasi%2Fzsh-context-sensitive-alias/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/uasi","download_url":"https://codeload.github.com/uasi/zsh-context-sensitive-alias/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223241332,"owners_count":17112127,"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":"2024-11-05T20:36:37.658Z","updated_at":"2024-11-05T20:36:38.264Z","avatar_url":"https://github.com/uasi.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Context-Sensitive Alias for Zsh\n\n特定のコンテキストで有効になるエイリアスを定義できるスクリプトです。\n\n使い方：\n\n```\n# {{{ in ~/.zshrc\n\n# 初期化\nsource csa.zsh\ncsa_init\n    \n# コンテキストを指定してエイリアスを定義する\n# csalias \u003ccontext\u003e \u003calias\u003e \u003ccommand\u003e\ncsalias git st 'git status'\ncsalias hg st 'hg status'\ncsalias rake ra 'rake'\ncsalias bundler ra 'bundle exec rake'\n\n# cd 先のリポジトリの種類に合わせてコンテキストを設定する（詳細は sample-zshrc.zsh で）\nfunction chpwd() { ... }\n\n# }}} \n\n# Git リポジトリに cd すると st == git status になる\n$ cd git-repo\n$ st\n# On branch master\nnothing to commit (working directory clean)\n\n# Hg リポジトリに cd すると st == hg status になる\n$ cd hg-repo\n$ st\n? readme.txt\n\n# リポジトリでないディレクトリでは st は未定義\n$ cd not-a-repo\n$ st\nzsh: command not found: st\n\n# Rakefile があるディレクトリに cd すると ra == rake になる\n$ cd some-ruby-lib\n$ ra --version\nrake, version 9.2.2\n\n# Gemfile があるディレクトリに cd すると ra == bundle exec rake になる\n# （同じディレクトリに Rakefile があっても ra == rake にはならない）\n$ cd some-rails-proj\n$ ra --version\nrake, version 9.1.0\n```\n\n設定方法については `sample-zshrc.zsh` をご覧ください。\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fuasi%2Fzsh-context-sensitive-alias","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fuasi%2Fzsh-context-sensitive-alias","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fuasi%2Fzsh-context-sensitive-alias/lists"}