mirror of
https://github.com/robbyrussell/oh-my-zsh.git
synced 2026-05-01 02:33:30 +02:00
Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 9151236d1e | |||
| 7e7cb5a23c | |||
| 2614f529ce |
@@ -4,7 +4,12 @@ custom/
|
|||||||
# temp files directories
|
# temp files directories
|
||||||
cache/
|
cache/
|
||||||
log/
|
log/
|
||||||
|
|
||||||
|
# Vim swap/backup files
|
||||||
*.swp
|
*.swp
|
||||||
|
*.swo
|
||||||
|
|
||||||
|
# macOS system files
|
||||||
.DS_Store
|
.DS_Store
|
||||||
|
|
||||||
# editor configs
|
# editor configs
|
||||||
@@ -13,3 +18,4 @@ log/
|
|||||||
|
|
||||||
# zcompile cached files
|
# zcompile cached files
|
||||||
*.zwc
|
*.zwc
|
||||||
|
*.zwc.old
|
||||||
|
|||||||
@@ -10,27 +10,27 @@ plugins=(... poetry)
|
|||||||
|
|
||||||
## Aliases
|
## Aliases
|
||||||
|
|
||||||
| Alias | Command | Description
|
| Alias | Command | Description |
|
||||||
|:----- |--------------------------------------------------- |:--------------------------------------------------------------------------------------- |
|
|:----- |--------------------------------------------------- |:--------------------------------------------------------------------------------------- |
|
||||||
| pad | `poetry add` | Add packages to `pyproject.toml` and install them |
|
| pad | `poetry add` | Add packages to `pyproject.toml` and install them |
|
||||||
| pbld | `poetry build` | Build the source and wheels archives |
|
| pbld | `poetry build` | Build the source and wheels archives |
|
||||||
| pch | `poetry check` | Validate the content of the `pyproject.toml` and its consistency with the `poetry.lock` |
|
| pch | `poetry check` | Validate the content of the `pyproject.toml` and its consistency with the `poetry.lock` |
|
||||||
| pcmd | `poetry list` | Display all the available Poetry commands |
|
| pcmd | `poetry list` | Display all the available Poetry commands |
|
||||||
| pconf | `poetry config --list` | Allow you to edit poetry config settings and repositories |
|
| pconf | `poetry config --list` | Allow you to edit poetry config settings and repositories |
|
||||||
| pexp | `poetry export --without-hashes > requirements.txt | Export the lock file to `requirements.txt` |
|
| pexp | `poetry export --without-hashes > requirements.txt` | Export the lock file to `requirements.txt` |
|
||||||
| pin | `poetry init` | Create a `pyproject.toml` interactively |
|
| pin | `poetry init` | Create a `pyproject.toml` interactively |
|
||||||
| pinst | `poetry install` | Read the `pyproject.toml`, resolve the dependencies, and install them |
|
| pinst | `poetry install` | Read the `pyproject.toml`, resolve the dependencies, and install them |
|
||||||
| plck | `poetry lock` | Lock the dependencies in `pyproject.toml` without installing |
|
| plck | `poetry lock` | Lock the dependencies in `pyproject.toml` without installing |
|
||||||
| pnew | `poetry new` | Create a directory structure suitable for most Python projects |
|
| pnew | `poetry new` | Create a directory structure suitable for most Python projects |
|
||||||
| ppath | `poetry env info --path` | Get the path of the currently activated virtualenv` |
|
| ppath | `poetry env info --path` | Get the path of the currently activated virtualenv |
|
||||||
| pplug | `poetry self show plugins` | List all the installed Poetry plugins |
|
| pplug | `poetry self show plugins` | List all the installed Poetry plugins |
|
||||||
| ppub | `poetry publish` | Publish the builded (`poetry build` command) package to the remote repository |
|
| ppub | `poetry publish` | Publish the built (`poetry build` command) package to the remote repository |
|
||||||
| prm | `poetry remove` | Remove packages from `pyproject.toml` and uninstall them |
|
| prm | `poetry remove` | Remove packages from `pyproject.toml` and uninstall them |
|
||||||
| prun | `poetry run` | Executes the given command inside the project’s virtualenv |
|
| prun | `poetry run` | Executes the given command inside the project’s virtualenv |
|
||||||
| psad | `poetry self add` | Add the Poetry plugin and install dependencies to make it work |
|
| psad | `poetry self add` | Add the Poetry plugin and install dependencies to make it work |
|
||||||
| psh | `poetry shell` | Spawns a shell within the virtual environment. If one doesn’t exist, it will be created |
|
| psh | `poetry shell` | Spawns a shell within the virtual environment. If one doesn’t exist, it will be created |
|
||||||
| pshw | `poetry show` | List all the available dependencies |
|
| pshw | `poetry show` | List all the available dependencies |
|
||||||
| pslt | `poetry show --latest` | List lastest version of the dependencies |
|
| pslt | `poetry show --latest` | List latest version of the dependencies |
|
||||||
| psup | `poetry self update` | Update Poetry to the latest version (default) or to the specified version |
|
| psup | `poetry self update` | Update Poetry to the latest version (default) or to the specified version |
|
||||||
| psync | `poetry install --sync` | Synchronize your environment with the `poetry.lock` |
|
| psync | `poetry install --sync` | Synchronize your environment with the `poetry.lock` |
|
||||||
| ptree | `poetry show --tree` | List the dependencies as tree |
|
| ptree | `poetry show --tree` | List the dependencies as tree |
|
||||||
|
|||||||
+2
-2
@@ -111,7 +111,7 @@ _yarn_commands_scripts() {
|
|||||||
packageJson=$(_yarn_find_package_json $opt_args[--cwd])
|
packageJson=$(_yarn_find_package_json $opt_args[--cwd])
|
||||||
binaries=($(builtin cd $opt_args[--cwd] && echo node_modules/.bin/*(x:t)))
|
binaries=($(builtin cd $opt_args[--cwd] && echo node_modules/.bin/*(x:t)))
|
||||||
else
|
else
|
||||||
packageJson=$(_yarn_find_package_json $pwd)
|
packageJson=$(_yarn_find_package_json $PWD)
|
||||||
binaries=($(echo node_modules/.bin/*(x:t)))
|
binaries=($(echo node_modules/.bin/*(x:t)))
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -135,7 +135,7 @@ _yarn_scripts() {
|
|||||||
binaries=($(builtin cd $_yarn_run_cwd && yarn bin | perl -wln -e 'm{^[^:]+: (\S+)$} and print $1'))
|
binaries=($(builtin cd $_yarn_run_cwd && yarn bin | perl -wln -e 'm{^[^:]+: (\S+)$} and print $1'))
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
packageJson=$(_yarn_find_package_json $pwd)
|
packageJson=$(_yarn_find_package_json $PWD)
|
||||||
if [[ -d node_modules ]]; then
|
if [[ -d node_modules ]]; then
|
||||||
binaries=($(echo node_modules/.bin/*(x:t)))
|
binaries=($(echo node_modules/.bin/*(x:t)))
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -1,10 +1,7 @@
|
|||||||
if [ $UID -eq 0 ]; then NCOLOR="red"; else NCOLOR="green"; fi
|
if [ $UID -eq 0 ]; then NCOLOR="red"; else NCOLOR="green"; fi
|
||||||
local return_code="%(?..%{$fg[red]%}%? ↵%{$reset_color%})"
|
local return_code="%(?..%{$fg[red]%}%? ↵%{$reset_color%})"
|
||||||
|
|
||||||
PROMPT='%{$fg[$NCOLOR]%}%n%{$reset_color%}@%{$fg[cyan]%}%m\
|
PROMPT='%{$fg[$NCOLOR]%}%n%{$reset_color%}@%{$fg[cyan]%}%m%{$reset_color%}:%{$fg[magenta]%}%~$(git_prompt_info) %{$fg[red]%}%(!.#.»)%{$reset_color%} '
|
||||||
%{$reset_color%}:%{$fg[magenta]%}%~\
|
|
||||||
$(git_prompt_info) \
|
|
||||||
%{$fg[red]%}%(!.#.»)%{$reset_color%} '
|
|
||||||
PROMPT2='%{$fg[red]%}\ %{$reset_color%}'
|
PROMPT2='%{$fg[red]%}\ %{$reset_color%}'
|
||||||
RPS1='${return_code}'
|
RPS1='${return_code}'
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user