1
0
mirror of https://github.com/ohmyzsh/ohmyzsh.git synced 2025-12-12 15:34:50 +08:00

Compare commits

..

No commits in common. "7deaff71a2be08145d83f0177edbf2dfb3e91262" and "1c58a746af7a67f311ee47f97285a855eaf18b5e" have entirely different histories.

6 changed files with 41 additions and 44 deletions

View File

@ -41,7 +41,7 @@ function aws_change_access_key() {
function aws_profiles() {
[[ -r "${AWS_CONFIG_FILE:-$HOME/.aws/config}" ]] || return 1
grep '\[profile' "${AWS_CONFIG_FILE:-$HOME/.aws/config}"|sed -e 's/.*profile \([a-zA-Z0-9@_\.-]*\).*/\1/'
grep '\[profile' "${AWS_CONFIG_FILE:-$HOME/.aws/config}"|sed -e 's/.*profile \([a-zA-Z0-9_\.-]*\).*/\1/'
}
function _aws_profiles() {

View File

@ -183,8 +183,8 @@ plugins=(... git)
Following the recent push for removing racially-charged words from our technical vocabulary, the git plugin favors using
a branch name other than `master`. In this case, we favor the shorter, neutral and descriptive term `main`. This means
that any aliases and functions that previously used `master`, will use `main` if `master` doesn't exist. We do this via
the function `git_main_branch`.
that any aliases and functions that previously used `master`, will use `main` if that branch exists. We do this via the
function `git_main_branch`.
### Deprecated aliases
@ -214,7 +214,7 @@ These are aliases that have been removed, renamed, or otherwise modified in a wa
| current_branch | Return the name of the current branch |
| git_current_user_name | Returns the `user.name` config value |
| git_current_user_email | Returns the `user.email` config value |
| git_main_branch | Returns the name of the main branch: `master` if it exists, `main` otherwise |
| git_main_branch | Returns the name of the main branch: `main` if it exists, `master` otherwise |
### Work in Progress (WIP)

View File

@ -27,10 +27,10 @@ function work_in_progress() {
# Check if main exists and use instead of master
function git_main_branch() {
if [[ -n "$(git branch --list master)" ]]; then
echo master
else
if [[ -n "$(git branch --list main)" ]]; then
echo main
else
echo master
fi
}

View File

@ -12,7 +12,7 @@ _mix_does_task_list_need_generating () {
}
_mix_generate () {
mix help | grep '^mix [^ ]' | sed -E "s/mix ([^ ]*) *# (.*)/\1:\2/" > .mix_tasks
mix help | grep -v 'iex -S' | tail -n +2 | cut -d " " -f 2 > .mix_tasks
}
_mix () {
@ -21,8 +21,7 @@ _mix () {
echo "\nGenerating .mix_tasks..." > /dev/stderr
_mix_generate
fi
local tasks=(${(f)"$(cat .mix_tasks)"})
_describe 'tasks' tasks
compadd `cat .mix_tasks`
fi
}

View File

@ -11,36 +11,35 @@ plugins=(... yarn)
## Aliases
| Alias | Command | Description |
| ----- | ----------------------------------------- | ----------------------------------------------------------------------------- |
| y | `yarn` | The Yarn command |
| ya | `yarn add` | Install a package in dependencies (`package.json`) |
| yad | `yarn add --dev` | Install a package in devDependencies (`package.json`) |
| yap | `yarn add --peer` | Install a package in peerDependencies (`package.json`) |
| yb | `yarn build` | Run the build script defined in `package.json` |
| ycc | `yarn cache clean` | Clean yarn's global cache of packages |
| yd | `yarn dev` | Run the dev script defined in `package.json` |
| yga | `yarn global add` | Install packages globally on your operating system |
| ygls | `yarn global list` | Lists global installed packages |
| ygrm | `yarn global remove` | Remove global installed packages from your OS |
| ygu | `yarn global upgrade` | Upgrade packages installed globally to their latest version |
| yh | `yarn help` | Show help for a yarn command |
| yi | `yarn init` | Interactively creates or updates a package.json file |
| yin | `yarn install` | Install dependencies defined in `package.json` |
| yln | `yarn lint` | Run the lint script defined in `package.json` |
| yls | `yarn list` | List installed packages |
| yout | `yarn outdated` | Check for outdated package dependencies |
| yp | `yarn pack` | Create a compressed gzip archive of package dependencies |
| yrm | `yarn remove` | Remove installed packages |
| yrun | `yarn run` | Run a defined package script |
| ys | `yarn serve` | Start the dev server |
| yst | `yarn start` | Run the start script defined in `package.json` |
| yt | `yarn test` | Run the test script defined in `package.json` |
| ytc | `yarn test --coverage` | Run the test script defined in `package.json` with coverage |
| yuc | `yarn global upgrade && yarn cache clean` | Upgrade global packages and clean yarn's global cache |
| yui | `yarn upgrade-interactive` | Prompt for which outdated packages to upgrade |
| yuil | `yarn upgrade-interactive --latest` | Prompt for which outdated packages to upgrade to the latest available version |
| yup | `yarn upgrade` | Upgrade packages to their latest version |
| yv | `yarn version` | Update the version of your package |
| yw | `yarn workspace` | Run a command within a single workspace. |
| yws | `yarn workspaces` | Run a command within all defined workspaces. |
| Alias | Command | Description |
|-------|-------------------------------------------|-------------------------------------------------------------|
| y | `yarn` | The Yarn command |
| ya | `yarn add` | Install a package in dependencies (`package.json`) |
| yad | `yarn add --dev` | Install a package in devDependencies (`package.json`) |
| yap | `yarn add --peer` | Install a package in peerDependencies (`package.json`) |
| yb | `yarn build` | Run the build script defined in `package.json` |
| ycc | `yarn cache clean` | Clean yarn's global cache of packages |
| yd | `yarn dev` | Run the dev script defined in `package.json` |
| yga | `yarn global add` | Install packages globally on your operating system |
| ygls | `yarn global list` | Lists global installed packages |
| ygrm | `yarn global remove` | Remove global installed packages from your OS |
| ygu | `yarn global upgrade` | Upgrade packages installed globally to their latest version |
| yh | `yarn help` | Show help for a yarn command |
| yi | `yarn init` | Interactively creates or updates a package.json file |
| yin | `yarn install` | Install dependencies defined in `package.json` |
| yln | `yarn lint` | Run the lint script defined in `package.json` |
| yls | `yarn list` | List installed packages |
| yout | `yarn outdated` | Check for outdated package dependencies |
| yp | `yarn pack` | Create a compressed gzip archive of package dependencies |
| yrm | `yarn remove` | Remove installed packages |
| yrun | `yarn run` | Run a defined package script |
| ys | `yarn serve` | Start the dev server |
| yst | `yarn start` | Run the start script defined in `package.json` |
| yt | `yarn test` | Run the test script defined in `package.json` |
| ytc | `yarn test --coverage` | Run the test script defined in `package.json` with coverage |
| yuc | `yarn global upgrade && yarn cache clean` | Upgrade global packages and clean yarn's global cache |
| yui | `yarn upgrade-interactive` | Prompt for which outdated packages to upgrade |
| yup | `yarn upgrade` | Upgrade packages to their latest version |
| yv | `yarn version` | Update the version of your package |
| yw | `yarn workspace` | Run a command within a single workspace. |
| yws | `yarn workspaces` | Run a command within all defined workspaces. |

View File

@ -24,7 +24,6 @@ alias yt="yarn test"
alias ytc="yarn test --coverage"
alias yuc="yarn global upgrade && yarn cache clean"
alias yui="yarn upgrade-interactive"
alias yuil="yarn upgrade-interactive --latest"
alias yup="yarn upgrade"
alias yv="yarn version"
alias yw="yarn workspace"