Skip to content

Commit

Permalink
🐛 Don't define less() when less exists
Browse files Browse the repository at this point in the history
  • Loading branch information
Freed-Wu committed Jan 12, 2024
1 parent 2ddcb85 commit 9134410
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions functions/main.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,11 @@
(($+commands[pygmentize])) || pygmentize() {bat $@}
(($+commands[mdcat])) || mdcat() {bat -lmarkdown}
# https://github.com/Freed-Wu/fzf-tab-source/issues/6
(($+commands[less])) && [ -x ~/.lessfilter ] &&
less() {~/.lessfilter $@ || command less $@} || (($+commands[less])) ||
less() {command ls -l $@}
if (($+commands[less])) && [ -x ~/.lessfilter ]; then
less() {~/.lessfilter $@ || command less $@}
else
(($+commands[less])) || less() {command ls -l $@}
fi
if ((! $+commands[finger])); then
(($+commands[pinky])) && finger() {command pinky $@} || finger() {command whoami}
fi
Expand Down

0 comments on commit 9134410

Please sign in to comment.