1
0
mirror of https://github.com/dcarrillo/prezto.git synced 2024-12-22 23:08:00 +00:00

Quote variables, improve readability

This commit is contained in:
Sorin Ionescu 2012-07-03 13:42:37 -04:00
parent 6bfb6f3104
commit bf18785bca

View File

@ -12,13 +12,13 @@ case "$1" in
zgrep --no-filename 'install ' $(ls -rt /var/log/dpkg*) zgrep --no-filename 'install ' $(ls -rt /var/log/dpkg*)
;; ;;
(upgrade|remove) (upgrade|remove)
zgrep --no-filename $1 $(ls -rt /var/log/dpkg*) zgrep --no-filename "$1" $(ls -rt /var/log/dpkg*)
;; ;;
(rollback) (rollback)
zgrep --no-filename upgrade $(ls -rt /var/log/dpkg*) | \ zgrep --no-filename upgrade $(ls -rt /var/log/dpkg*) \
grep "$2" -A10000000 | \ | grep "$2" -A10000000 \
grep "$3" -B10000000 | \ | grep "$3" -B10000000 \
awk '{print $4"="$5}' | awk '{print $4"="$5}'
;; ;;
(list) (list)
zcat $(ls -rt /var/log/dpkg*) zcat $(ls -rt /var/log/dpkg*)