mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-07-03 10:08:25 +00:00
Compare commits
6 Commits
df34d2b8d5
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ff2f16e8df | ||
|
|
81becab1e7 | ||
|
|
65749801cf | ||
|
|
d2379b2701 | ||
|
|
ff1df9a039 | ||
|
|
639b566f0e |
4
.github/workflows/dependencies.yml
vendored
4
.github/workflows/dependencies.yml
vendored
@@ -21,7 +21,7 @@ jobs:
|
|||||||
egress-policy: audit
|
egress-policy: audit
|
||||||
|
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
- name: Authenticate as @ohmyzsh
|
- name: Authenticate as @ohmyzsh
|
||||||
@@ -31,7 +31,7 @@ jobs:
|
|||||||
client-id: ${{ secrets.OHMYZSH_CLIENT_ID }}
|
client-id: ${{ secrets.OHMYZSH_CLIENT_ID }}
|
||||||
private-key: ${{ secrets.OHMYZSH_APP_PRIVATE_KEY }}
|
private-key: ${{ secrets.OHMYZSH_APP_PRIVATE_KEY }}
|
||||||
- name: Setup Python
|
- name: Setup Python
|
||||||
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
|
uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6.3.0
|
||||||
with:
|
with:
|
||||||
python-version: "3.12"
|
python-version: "3.12"
|
||||||
cache: "pip"
|
cache: "pip"
|
||||||
|
|||||||
4
.github/workflows/installer.yml
vendored
4
.github/workflows/installer.yml
vendored
@@ -31,7 +31,7 @@ jobs:
|
|||||||
egress-policy: audit
|
egress-policy: audit
|
||||||
|
|
||||||
- name: Set up git repository
|
- name: Set up git repository
|
||||||
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
||||||
- name: Install zsh
|
- name: Install zsh
|
||||||
if: runner.os == 'Linux'
|
if: runner.os == 'Linux'
|
||||||
run: sudo apt-get update; sudo apt-get install zsh
|
run: sudo apt-get update; sudo apt-get install zsh
|
||||||
@@ -52,7 +52,7 @@ jobs:
|
|||||||
egress-policy: audit
|
egress-policy: audit
|
||||||
|
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
||||||
- name: Install Vercel CLI
|
- name: Install Vercel CLI
|
||||||
run: npm install -g vercel
|
run: npm install -g vercel
|
||||||
- name: Setup project and deploy
|
- name: Setup project and deploy
|
||||||
|
|||||||
2
.github/workflows/main.yml
vendored
2
.github/workflows/main.yml
vendored
@@ -29,7 +29,7 @@ jobs:
|
|||||||
egress-policy: audit
|
egress-policy: audit
|
||||||
|
|
||||||
- name: Set up git repository
|
- name: Set up git repository
|
||||||
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
||||||
- name: Install zsh
|
- name: Install zsh
|
||||||
run: sudo apt-get update; sudo apt-get install zsh
|
run: sudo apt-get update; sudo apt-get install zsh
|
||||||
- name: Check syntax
|
- name: Check syntax
|
||||||
|
|||||||
2
.github/workflows/scorecard.yml
vendored
2
.github/workflows/scorecard.yml
vendored
@@ -41,7 +41,7 @@ jobs:
|
|||||||
egress-policy: audit
|
egress-policy: audit
|
||||||
|
|
||||||
- name: "Checkout code"
|
- name: "Checkout code"
|
||||||
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
||||||
with:
|
with:
|
||||||
persist-credentials: false
|
persist-credentials: false
|
||||||
|
|
||||||
|
|||||||
@@ -371,7 +371,7 @@ multi == 1 && /^[^#]*\)/ {
|
|||||||
next
|
next
|
||||||
}
|
}
|
||||||
|
|
||||||
# if multi flag is enabled and we didnt find a closing parenthesis,
|
# if multi flag is enabled and we didn't find a closing parenthesis,
|
||||||
# get the indentation level to match when adding plugins
|
# get the indentation level to match when adding plugins
|
||||||
multi == 1 && /^[^#]*/ {
|
multi == 1 && /^[^#]*/ {
|
||||||
indent=\"\"
|
indent=\"\"
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ plugins=(... bundler)
|
|||||||
| `bo` | `bundle open` | Opens the source directory for a gem in your bundle |
|
| `bo` | `bundle open` | Opens the source directory for a gem in your bundle |
|
||||||
| `bout` | `bundle outdated` | List installed gems with newer versions available |
|
| `bout` | `bundle outdated` | List installed gems with newer versions available |
|
||||||
| `bp` | `bundle package` | Package your needed .gem files into your application |
|
| `bp` | `bundle package` | Package your needed .gem files into your application |
|
||||||
| `bu` | `bundle update` | Update your gems to the latest available versions |
|
| `bu` | `bundle update --all` | Update your gems to the latest available versions |
|
||||||
|
|
||||||
## Gem wrapper
|
## Gem wrapper
|
||||||
|
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ alias bl="bundle list"
|
|||||||
alias bo="bundle open"
|
alias bo="bundle open"
|
||||||
alias bout="bundle outdated"
|
alias bout="bundle outdated"
|
||||||
alias bp="bundle package"
|
alias bp="bundle package"
|
||||||
alias bu="bundle update"
|
alias bu="bundle update --all"
|
||||||
|
|
||||||
## Gem wrapper
|
## Gem wrapper
|
||||||
|
|
||||||
|
|||||||
@@ -78,7 +78,7 @@ if is-at-least 4.2.0; then
|
|||||||
alias -s chm=xchm
|
alias -s chm=xchm
|
||||||
alias -s djvu=djview
|
alias -s djvu=djview
|
||||||
|
|
||||||
#list whats inside packed file
|
#list what's inside packed file
|
||||||
alias -s zip="unzip -l"
|
alias -s zip="unzip -l"
|
||||||
alias -s rar="unrar l"
|
alias -s rar="unrar l"
|
||||||
alias -s tar="tar tf"
|
alias -s tar="tar tf"
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ The plugin also documents two other ways to do this:
|
|||||||
|
|
||||||
1. Using a function wrapper, such that, for example, there exists a function
|
1. Using a function wrapper, such that, for example, there exists a function
|
||||||
named `ls` which calls `gls` instead. Since functions have a higher preference
|
named `ls` which calls `gls` instead. Since functions have a higher preference
|
||||||
than commands, this ends up calling the GNU coreutil. It has also a higher
|
than commands, this ends up calling the GNU coreutils. It has also a higher
|
||||||
preference over shell builtins (`gecho` is called instead of the builtin `echo`).
|
preference over shell builtins (`gecho` is called instead of the builtin `echo`).
|
||||||
|
|
||||||
2. Using an alias. This has an even higher preference than functions, but they
|
2. Using an alias. This has an even higher preference than functions, but they
|
||||||
|
|||||||
@@ -23,7 +23,7 @@
|
|||||||
#
|
#
|
||||||
# Enable caching:
|
# Enable caching:
|
||||||
#
|
#
|
||||||
# If you want to use the cache, set the followings in your .zshrc:
|
# If you want to use the cache, set the following in your .zshrc:
|
||||||
#
|
#
|
||||||
# zstyle ':completion:*' use-cache yes
|
# zstyle ':completion:*' use-cache yes
|
||||||
#
|
#
|
||||||
|
|||||||
@@ -295,8 +295,8 @@ _history-substring-search-begin() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
#
|
#
|
||||||
# Escape and join query parts with wildcard character '*' as seperator
|
# Escape and join query parts with wildcard character '*' as separator
|
||||||
# `(j:CHAR:)` join array to string with CHAR as seperator
|
# `(j:CHAR:)` join array to string with CHAR as separator
|
||||||
#
|
#
|
||||||
local search_pattern="${(j:*:)_history_substring_search_query_parts[@]//(#m)[\][()|\\*?#<>~^]/\\$MATCH}*"
|
local search_pattern="${(j:*:)_history_substring_search_query_parts[@]//(#m)[\][()|\\*?#<>~^]/\\$MATCH}*"
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
# Pulumi
|
# Pulumi
|
||||||
|
|
||||||
This is an **Oh My Zsh plugin** for the [**Pulumi CLI**](https://www.pulumi.com/docs/iac/cli/),
|
This is an **Oh My Zsh plugin** for the [**Pulumi CLI**](https://www.pulumi.com/docs/iac/cli/),
|
||||||
an Infrastructure as Code (IaC) tool for building, deploying and managing cloud infrastucture.
|
an Infrastructure as Code (IaC) tool for building, deploying and managing cloud infrastructure.
|
||||||
|
|
||||||
This plugin provides:
|
This plugin provides:
|
||||||
|
|
||||||
|
|||||||
@@ -10,7 +10,7 @@
|
|||||||
# scp1@shiva:pts/9-> /home » scp1 (0)
|
# scp1@shiva:pts/9-> /home » scp1 (0)
|
||||||
# >
|
# >
|
||||||
#
|
#
|
||||||
# that's user@host:pts/-> splitted path (return status)
|
# that's user@host:pts/-> split path (return status)
|
||||||
#
|
#
|
||||||
# If the current directory is a git repository, we span 3 lines;
|
# If the current directory is a git repository, we span 3 lines;
|
||||||
#
|
#
|
||||||
|
|||||||
@@ -51,7 +51,7 @@ USER=${USER:-$(id -u -n)}
|
|||||||
# POSIX: https://pubs.opengroup.org/onlinepubs/009696899/basedefs/xbd_chap08.html#tag_08_03
|
# POSIX: https://pubs.opengroup.org/onlinepubs/009696899/basedefs/xbd_chap08.html#tag_08_03
|
||||||
HOME="${HOME:-$(getent passwd $USER 2>/dev/null | cut -d: -f6)}"
|
HOME="${HOME:-$(getent passwd $USER 2>/dev/null | cut -d: -f6)}"
|
||||||
# macOS does not have getent, but this works even if $HOME is unset
|
# macOS does not have getent, but this works even if $HOME is unset
|
||||||
HOME="${HOME:-$(eval echo ~$USER)}"
|
HOME="${HOME:-$(eval echo ~"$USER")}"
|
||||||
|
|
||||||
|
|
||||||
# Track if $ZSH was provided
|
# Track if $ZSH was provided
|
||||||
@@ -344,7 +344,7 @@ setup_zshrc() {
|
|||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ $OVERWRITE_CONFIRMATION != "no" ]; then
|
if [ "$OVERWRITE_CONFIRMATION" != "no" ]; then
|
||||||
# Ask user for confirmation before backing up and overwriting
|
# Ask user for confirmation before backing up and overwriting
|
||||||
echo "${FMT_YELLOW}Found ${zdot}/.zshrc."
|
echo "${FMT_YELLOW}Found ${zdot}/.zshrc."
|
||||||
echo "The existing .zshrc will be backed up to .zshrc.pre-oh-my-zsh if overwritten."
|
echo "The existing .zshrc will be backed up to .zshrc.pre-oh-my-zsh if overwritten."
|
||||||
@@ -475,12 +475,14 @@ EOF
|
|||||||
if user_can_sudo; then
|
if user_can_sudo; then
|
||||||
sudo -k >/dev/null 2>&1 || true # -k forces the password prompt when supported
|
sudo -k >/dev/null 2>&1 || true # -k forces the password prompt when supported
|
||||||
sudo chsh -s "$zsh" "$USER"
|
sudo chsh -s "$zsh" "$USER"
|
||||||
|
chsh_status=$?
|
||||||
else
|
else
|
||||||
chsh -s "$zsh" "$USER" # run chsh normally
|
chsh -s "$zsh" "$USER" # run chsh normally
|
||||||
|
chsh_status=$?
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Check if the shell change was successful
|
# Check if the shell change was successful
|
||||||
if [ $? -ne 0 ]; then
|
if [ "$chsh_status" -ne 0 ]; then
|
||||||
fmt_error "chsh command unsuccessful. Change your default shell manually."
|
fmt_error "chsh command unsuccessful. Change your default shell manually."
|
||||||
else
|
else
|
||||||
export SHELL="$zsh"
|
export SHELL="$zsh"
|
||||||
|
|||||||
Reference in New Issue
Block a user