mirror of
https://github.com/dcarrillo/prezto.git
synced 2025-07-01 09:19:25 +00:00
Compare commits
1 Commits
pull/539-p
...
revision/u
Author | SHA1 | Date | |
---|---|---|---|
8d9ec24335 |
@ -22,7 +22,11 @@ Aliases
|
||||
-------
|
||||
|
||||
- `d` prints the contents of the directory stack.
|
||||
- `1 ... 9` changes the directory to the **n** previous one.
|
||||
|
||||
Functions
|
||||
---------
|
||||
|
||||
- `command_not_found_handler` changes the directory to the **n** previous one.
|
||||
|
||||
Authors
|
||||
-------
|
||||
|
13
modules/directory/functions/command_not_found_handler
Normal file
13
modules/directory/functions/command_not_found_handler
Normal file
@ -0,0 +1,13 @@
|
||||
#
|
||||
# Changes the directory to the n previous one.
|
||||
#
|
||||
# Authors:
|
||||
# Sorin Ionescu <sorin.ionescu@gmail.com>
|
||||
#
|
||||
|
||||
if [[ "$1" == [[:digit:]]## ]]; then
|
||||
builtin cd "+$1"
|
||||
else
|
||||
return 127
|
||||
fi
|
||||
|
@ -27,5 +27,4 @@ unsetopt CLOBBER # Do not overwrite existing files with > and >>.
|
||||
#
|
||||
|
||||
alias d='dirs -v'
|
||||
for index ({1..9}) alias "$index"="cd +${index}"; unset index
|
||||
|
||||
|
@ -9,13 +9,10 @@
|
||||
pacman --query --explicit --info \
|
||||
| awk '
|
||||
BEGIN {
|
||||
FS=" : "
|
||||
FS=":"
|
||||
}
|
||||
/^Name/ {
|
||||
printf "\033[0;01m" $2 "\033[0m"
|
||||
}
|
||||
/^Version/ {
|
||||
print " \033[1;32m" $2 "\033[0m"
|
||||
print $2
|
||||
}
|
||||
/^Description/ {
|
||||
print $2
|
||||
|
@ -28,7 +28,6 @@ if (( $+commands[$_pacman_frontend] )); then
|
||||
source "${0:h}/${_pacman_frontend}.zsh"
|
||||
fi
|
||||
else
|
||||
_pacman_frontend='pacman'
|
||||
_pacman_sudo='sudo '
|
||||
fi
|
||||
|
||||
@ -37,7 +36,7 @@ fi
|
||||
#
|
||||
|
||||
# Pacman.
|
||||
alias pac="${_pacman_frontend}"
|
||||
alias pac= "${_pacman_frontend}"
|
||||
|
||||
# Installs packages from repositories.
|
||||
alias paci="${_pacman_sudo}${_pacman_frontend} --sync"
|
||||
@ -64,7 +63,7 @@ alias pacs="${_pacman_frontend} --sync --search"
|
||||
alias pacS="${_pacman_frontend} --query --search"
|
||||
|
||||
# Lists orphan packages.
|
||||
alias pacman-list-orphans="${_pacman_frontend} --query --deps --unrequired"
|
||||
alias pacman-list-orphans="${_pacman_sudo}${_pacman_frontend} --query --deps --unrequired"
|
||||
|
||||
# Removes orphan packages.
|
||||
alias pacman-remove-orphans="${_pacman_sudo}${_pacman_frontend} --remove --recursive \$(${_pacman_frontend} --quiet --query --deps --unrequired)"
|
||||
|
Reference in New Issue
Block a user