Compare commits
No commits in common. "03f804f1f30f8d82bb4c91c6dd8121b5836409b3" and "10c79c9dd177f794edf11f6676644f67fb72e15a" have entirely different histories.
03f804f1f3
...
10c79c9dd1
@ -69,15 +69,6 @@ alias sol-dark='set-scheme.sh solarized.dark'
|
||||
alias quota='quota -gls'
|
||||
{{ end -}}
|
||||
|
||||
# if tldr++ is installed, use it the static way
|
||||
if tldr --version &> /dev/null
|
||||
then
|
||||
tldrVersion="$(tldr --version 2>&1)"
|
||||
if [[ $tldrVersion =~ tldr\+\+.* ]]; then
|
||||
alias tldr='tldr --static'
|
||||
fi
|
||||
fi
|
||||
|
||||
# Depending on availability
|
||||
if [ -x /usr/bin/batcat ]; then
|
||||
alias cat='batcat'
|
||||
@ -85,8 +76,3 @@ fi
|
||||
if [ -x /usr/bin/bat ] || [ -x bat ]; then
|
||||
alias cat='bat'
|
||||
fi
|
||||
|
||||
# 'fd' on Debian is 'fdfind'
|
||||
if [ -x /usr/bin/fdfind ]; then
|
||||
alias fd='fdfind'
|
||||
fi
|
||||
|
||||
@ -113,34 +113,28 @@ list-ssh-keys() {
|
||||
done
|
||||
}
|
||||
|
||||
{{ if eq .chezmoi.os "linux" }}
|
||||
{{ if eq .chezmoi.osRelease.id "debian" }}
|
||||
# Show version of a Debian package
|
||||
debversion() {
|
||||
local pkgname="${1:?packagename required}"
|
||||
dpkg -s $pkgname | grep Version
|
||||
if [ -x dpkg ]; then
|
||||
local pkgname="${1:?packagename required}"
|
||||
dpkg -s $pkgname | grep Version
|
||||
else
|
||||
echo "not a Debian based system!"
|
||||
return 42
|
||||
fi
|
||||
}
|
||||
|
||||
# Show files of a Debian package
|
||||
deblist() {
|
||||
local pkgname="${1:?packagenamme required}"
|
||||
dpkg-query -L $pkgname
|
||||
if [ -x dpkg ]; then
|
||||
local pkgname="${1:?packagenamme required}"
|
||||
dpkg-query -L $pkgname
|
||||
else
|
||||
echo "not a Debian based system!"
|
||||
return 42
|
||||
fi
|
||||
}
|
||||
|
||||
# Show apt installation history
|
||||
debhistory() {
|
||||
zcat /var/log/apt/history.log.*.gz | \
|
||||
/usr/bin/cat - /var/log/apt/history.log | \
|
||||
grep -Po '^Commandline:(?= apt)(?=.* install ) \K.*|^Start-Date: \K.*' | \
|
||||
grep -B1 "^apt" | \
|
||||
grep -v -- "^--" | \
|
||||
paste -d " " - - | \
|
||||
sort
|
||||
}
|
||||
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
# Run 'top' by a list of processes matching name.
|
||||
topby() {
|
||||
local name=${1:?name required}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user