aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnton Bobov <abobov@gmail.com>2020-02-04 23:08:59 +0500
committerAnton Bobov <abobov@gmail.com>2020-02-04 23:08:59 +0500
commit2a063c9edf44ff4e5824a4b73e617c0bd321fb36 (patch)
treebed679ef3b501ebfb4ed305552e826ee8d09f019
parentb00908d513f35dbee98c52b6609cfceaa6eae371 (diff)
Updates.
-rwxr-xr-xfiles/.lessfilter.sh26
-rw-r--r--files/.zsh/rc/S50_aliases6
-rw-r--r--packages.debian21
3 files changed, 36 insertions, 17 deletions
diff --git a/files/.lessfilter.sh b/files/.lessfilter.sh
index 9580bf6..b487794 100755
--- a/files/.lessfilter.sh
+++ b/files/.lessfilter.sh
@@ -1,10 +1,26 @@
-#!/bin/sh
+#!/bin/bash
case $1 in
- *.xml) if [ -x `which xmlstarlet 2>/dev/null` ]; then exec xmlstarlet fo "$1"; fi ;;
- *.json) if [ -x `which jq 2>/dev/null` ]; then exec jq -C . "$1"; fi ;;
- *.md) if [ -x `which pandoc 2>/dev/null` ]; then exec pandoc -t plain "$1"; fi ;;
- *) exec /bin/lesspipe "$1";;
+ *.xml)
+ if [ -x "$(command -v xmlstarlet)" ]; then
+ exec xmlstarlet fo "$1"
+ fi
+ ;;
+ *.json)
+ if [ -x "$(command -v jq)" ]; then
+ exec jq -C . "$1"
+ elif [ -x "$(command -v python)" ] ; then
+ exec python -m json.tool "$1"
+ fi
+ ;;
+ *.md)
+ if [ -x "$(command -v pandoc)" ]; then
+ exec pandoc -t plain "$1"
+ fi
+ ;;
+ *)
+ exec /bin/lesspipe "$1"
+ ;;
esac
exit 1
diff --git a/files/.zsh/rc/S50_aliases b/files/.zsh/rc/S50_aliases
index c8923ca..2df9d82 100644
--- a/files/.zsh/rc/S50_aliases
+++ b/files/.zsh/rc/S50_aliases
@@ -116,15 +116,15 @@ function dc-stats() {
alias portcheck='nc -z -v -w 5'
alias jq='jq --color-output'
-if $(which colordiff >/dev/null) ; then
+if [ -x "$(command -v colordiff)" ] ; then
alias diff='colordiff -u'
else
alias diff='diff -u'
fi
-if $(which unoconv >/dev/null) ; then
+if [ -x "$(command -v unoconv)" ] ; then
alias 2pdf='unoconv --format pdf'
-elif $(which libreoffice >/dev/null) ; then
+elif [ -x "$(command -v libreoffice)" ] ; then
alias 2pdf='libreoffice --headless --convert-to pdf'
fi
diff --git a/packages.debian b/packages.debian
index e8002ef..35950b9 100644
--- a/packages.debian
+++ b/packages.debian
@@ -1,15 +1,18 @@
-git
-tmux
-vim-nox
-fzf
-htop
-zsh
-aptitude
apt-listbugs
-deborphan
+aptitude
aria2
atool
-jq
+deborphan
+fd-find
+fzf
+git
+htop
httpie
ipython
+jq
+ncdu
silversearcher-ag
+tldr
+tmux
+vim-nox
+zsh