From 2df099816f1154fe9c6cbd90135d5cf5664c0d1c Mon Sep 17 00:00:00 2001 From: "Sven \"qoreQyaS\" Grewe" Date: Fri, 23 Dec 2022 05:40:12 +0100 Subject: [PATCH] :bug: Fix many syntax errors Signed-off-by: Sven "qoreQyaS" Grewe --- sources/-command-.zsh | 1 + sources/git-checkout.zsh | 3 +-- sources/git-reflog.zsh | 4 ++-- sources/pygmentize.zsh | 1 + sources/run-help.zsh | 11 +++++++---- 5 files changed, 12 insertions(+), 8 deletions(-) diff --git a/sources/-command-.zsh b/sources/-command-.zsh index 998f76e..b6bd12c 100644 --- a/sources/-command-.zsh +++ b/sources/-command-.zsh @@ -11,4 +11,5 @@ case $group in ;; parameter) echo ${(P)word} + ;; esac diff --git a/sources/git-checkout.zsh b/sources/git-checkout.zsh index beb8e9a..8793362 100644 --- a/sources/git-checkout.zsh +++ b/sources/git-checkout.zsh @@ -4,8 +4,7 @@ case $group in git diff $word | delta ;; 'recent commit object name') - git log --color=always $word | perl -pe$(jq -j '.[] as $i | "s=" + $i.code + "=" + $i.emoji + "=g;"' ~/.gitmoji/gitmojis.json) - | delta + git log --color=always $word | perl -pe$(jq -j '.[] as $i | "s=" + $i.code + "=" + $i.emoji + "=g;"' ~/.gitmoji/gitmojis.json) | delta ;; *) git log --color=always $word | perl -pe$(jq -j '.[] as $i | "s=" + $i.code + "=" + $i.emoji + "=g;"' ~/.gitmoji/gitmojis.json) diff --git a/sources/git-reflog.zsh b/sources/git-reflog.zsh index 6d1fae3..77831cf 100644 --- a/sources/git-reflog.zsh +++ b/sources/git-reflog.zsh @@ -1,9 +1,9 @@ # :fzf-tab:complete:git-reflog(|-*):argument-1 case $group in command) - git reflog --color=always show | perl -pe$(jq -j '.[] as $i | "s=" + $i.code + "=" + $i.emoji + "=g;"' ~/.gitmoji/gitmojis.json + git reflog --color=always show | perl -pe$(jq -j '.[] as $i | "s=" + $i.code + "=" + $i.emoji + "=g;"' ~/.gitmoji/gitmojis.json) ;; reference) - git reflog --color=always $word | perl -pe$(jq -j '.[] as $i | "s=" + $i.code + "=" + $i.emoji + "=g;"' ~/.gitmoji/gitmojis.json + git reflog --color=always $word | perl -pe$(jq -j '.[] as $i | "s=" + $i.code + "=" + $i.emoji + "=g;"' ~/.gitmoji/gitmojis.json) ;; esac diff --git a/sources/pygmentize.zsh b/sources/pygmentize.zsh index 2b58268..6d3386a 100644 --- a/sources/pygmentize.zsh +++ b/sources/pygmentize.zsh @@ -2,6 +2,7 @@ case $group in L) pygmentize -L $word | bat --color=always -plrst + ;; *) [[ -f ${realpath#--*=} ]] && pygmentize ${realpath#--*=} || less ${realpath#--*=} ;; diff --git a/sources/run-help.zsh b/sources/run-help.zsh index e470022..79058f6 100644 --- a/sources/run-help.zsh +++ b/sources/run-help.zsh @@ -1,9 +1,12 @@ # :fzf-tab:complete:(\\|)run-help:argument-rest -# Note run-help usually is an alias, remember: +# NOTE: `run-help` is an alias of `man` in zsh by default, +# which means `run-help` will use `man`'s completion. +# you must add the following code to your `~/.zshrc` to enable and unalias it: # # ```zsh -# (($+aliases[run-help])) - && unalias run-help -# autoload -Uz run-help +# autoload -Uz run-help && (($+aliases[run-help])) && unalias run-help # ``` +# +# true `run-help` can display the help of zsh built-in commands +# while `man` can display the help of external commands run-help $word