I'm using https://github.com/magicmonty/bash-git-prompt to customize my bash prompt. so, my prompt usually looks something like this
✔ ~/dotfiles [master|⚑ 1]
15:00 $
is there any command with which I can capture that prompt text? I want the [master|⚑ 1]
text without having to copy the bash-git-prompt code into a new shell script.
script
is an external tool, so it doesn't care what version ofbash
(or indeed what shell) you're using. – DopeGhoti Feb 20 '20 at 14:17