if (( $+commands[tag] )); then
  tag() { command tag "$@" && source /tmp/tag_aliases_$USER 2>/dev/null }
  alias ag="tag rg"
  alias rg="tag rg"
else
  alias ag=rg
fi

if (( $+commands[tag] )); then
  tag() { command tag "$@" && source /tmp/tag_aliases_$USER 2>/dev/null }
  alias ag="echo 'use s'"
  alias s="tag rg"
  alias rg="echo 'use s'"
else
  alias ag=rg
fi

Switch to s alias for searching
Switch to s alias for searching

I got tired of change my muscle memory as I changed tools
