7 Commits

Author SHA1 Message Date
ANDI FAUZAN HEDIANTORO
df34d2b8d5 chore(ansible): zsh-ify some code (#13797) 2026-06-15 12:22:58 +02:00
Lucas Ma
96ea17080a fix(installer): tolerate sudo shims without -k (#13821)
Co-authored-by: Lucas Ma <7184042+pony-maggie@users.noreply.github.com>
2026-06-15 12:18:28 +02:00
Lucas Ma
0a91ce20d5 fix(vi-mode): keep cursor hook status successful (#13822) 2026-06-15 12:15:30 +02:00
御风
9a67e3b3f5 fix(git): support nounset option (#13816) 2026-06-15 12:08:05 +02:00
SOUFIAN3HM
d708ca9d99 fix(macports): correct inverted logic (#13812) 2026-06-15 12:06:22 +02:00
SOUFIAN3HM
ffa8487bc7 fix(aws): use return instead of exit to avoid killing the shell (#13811) 2026-06-15 11:56:22 +02:00
Yotam Korah
3f6f72010f feat(dnf): add dnfur alias (#13806) 2026-06-15 11:51:24 +02:00
8 changed files with 29 additions and 27 deletions

View File

@@ -162,13 +162,13 @@ if zstyle -t ':omz:alpha:lib:git' async-prompt \
# or any of the other prompt variables
function _defer_async_git_register() {
# Check if git_prompt_info is used in a prompt variable
case "${PS1}:${PS2}:${PS3}:${PS4}:${RPROMPT}:${RPS1}:${RPS2}:${RPS3}:${RPS4}" in
case "${PS1}:${PS2}:${PS3}:${PS4}:${RPROMPT-}:${RPS1-}:${RPS2-}:${RPS3-}:${RPS4-}" in
*(\$\(git_prompt_info\)|\`git_prompt_info\`)*)
_omz_register_handler _omz_git_prompt_info
;;
esac
case "${PS1}:${PS2}:${PS3}:${PS4}:${RPROMPT}:${RPS1}:${RPS2}:${RPS3}:${RPS4}" in
case "${PS1}:${PS2}:${PS3}:${PS4}:${RPROMPT-}:${RPS1-}:${RPS2-}:${RPS3-}:${RPS4-}" in
*(\$\(git_prompt_status\)|\`git_prompt_status\`)*)
_omz_register_handler _omz_git_prompt_status
;;

View File

@@ -1,13 +1,13 @@
# Functions
function ansible-version(){
function ansible-version() {
ansible --version
}
function ansible-role-init(){
if ! [ -z $1 ] ; then
function ansible-role-init() {
if [[ -n "$1" ]]; then
echo "Ansible Role : $1 Creating...."
ansible-galaxy init $1
tree $1
ansible-galaxy init "$1"
tree "$1"
else
echo "Usage : ansible-role-init <role name>"
echo "Example : ansible-role-init role1"

View File

@@ -9,14 +9,14 @@ function agr() {
# Update state file if enabled
function _aws_update_state() {
if [[ "$AWS_PROFILE_STATE_ENABLED" == true ]]; then
test -d $(dirname ${AWS_STATE_FILE}) || exit 1
test -d $(dirname ${AWS_STATE_FILE}) || return 1
echo "${AWS_PROFILE} ${AWS_REGION}" > "${AWS_STATE_FILE}"
fi
}
function _aws_clear_state() {
if [[ "$AWS_PROFILE_STATE_ENABLED" == true ]]; then
test -d $(dirname ${AWS_STATE_FILE}) || exit 1
test -d $(dirname ${AWS_STATE_FILE}) || return 1
echo -n > "${AWS_STATE_FILE}"
fi
}

View File

@@ -16,7 +16,7 @@ of `dnf5` and uses it as drop-in alternative to the slower `dnf`.
## Aliases
| Alias | Command | Description |
|-------|-------------------------|--------------------------|
|-------|-------------------------------|------------------------------------------|
| dnfl | `dnf list` | List packages |
| dnfli | `dnf list --installed` | List installed packages |
| dnfgl | `dnf grouplist` | List package groups |
@@ -25,6 +25,7 @@ of `dnf5` and uses it as drop-in alternative to the slower `dnf`.
| dnfs | `dnf search` | Search package |
| **Use `sudo`** |
| dnfu | `sudo dnf upgrade` | Upgrade package |
| dnfur | `sudo dnf upgrade --refresh` | Upgrade package (force metadata refresh) |
| dnfi | `sudo dnf install` | Install package |
| dnfgi | `sudo dnf groupinstall` | Install package group |
| dnfr | `sudo dnf remove` | Remove package |

View File

@@ -11,6 +11,7 @@ alias dnfp="${dnfprog} info" # Show package information
alias dnfs="${dnfprog} search" # Search package
alias dnfu="sudo ${dnfprog} upgrade" # Upgrade package
alias dnfur="sudo ${dnfprog} upgrade --refresh" # Upgrade package and refresh repos
alias dnfi="sudo ${dnfprog} install" # Install package
alias dnfr="sudo ${dnfprog} remove" # Remove package
alias dnfc="sudo ${dnfprog} clean all" # Clean cache

View File

@@ -8,7 +8,7 @@ alias puo="sudo port upgrade outdated"
alias pup="sudo port selfupdate && sudo port upgrade outdated"
port-livecheck-maintainer() {
(( ${+commands[port]} == 0 )) || {
(( ${+commands[port]} )) || {
print -- "port: not found" >&2
return 1
}

View File

@@ -26,7 +26,7 @@ typeset -g VI_MODE_CURSOR_OPPEND=${VI_MODE_CURSOR_OPPEND:=0}
typeset -g VI_KEYMAP=${VI_KEYMAP:=main}
function _vi-mode-set-cursor-shape-for-keymap() {
[[ "$VI_MODE_SET_CURSOR" = true ]] || return
[[ "$VI_MODE_SET_CURSOR" = true ]] || return 0
# https://vt100.net/docs/vt510-rm/DECSCUSR
local _shape=0

View File

@@ -473,7 +473,7 @@ EOF
# be prompted for the password either way, so this shouldn't cause any issues.
#
if user_can_sudo; then
sudo -k >/dev/null 2>&1 # -k forces the password prompt
sudo -k >/dev/null 2>&1 || true # -k forces the password prompt when supported
sudo chsh -s "$zsh" "$USER"
else
chsh -s "$zsh" "$USER" # run chsh normally