ccat () { # config cat. see a config without extra lines.
- grep '^\s*[^;[:space:]#]' "$@"
+ grep '^\s*[^;[:space:]#]' "$@" || [[ $? == 1 ]]
}
k() { # history search
- grep -P --binary-files=text "$@" ${HISTFILE:-~/.bash_history} | tail -n 80;
+ grep -P --binary-files=text "$@" ${HISTFILE:-~/.bash_history} | tail -n 80 || [[ $? == 1 ]];
}
ks() { # history search
- grep -P --binary-files=text "$@" ${HISTFILE:-~/.bash_history} | uniq;
+ grep -P --binary-files=text "$@" ${HISTFILE:-~/.bash_history} | uniq || [[ $? == 1 ]];
}
c $(mktemp -d)
pkg=$1
# shellcheck disable=SC2012
- cached=$(ls -t /var/cache/apt/archives/$pkg* | tail -n1 2>/dev/null)
+ cached=$(ls -t /var/cache/apt/archives/$pkg* | tail -n1 2>/dev/null) ||:
if [[ $cached ]]; then
cp $cached .
else