1
0
mirror of https://github.com/ohmyzsh/ohmyzsh.git synced 2026-02-13 05:59:46 +08:00

Compare commits

..

3 Commits

Author SHA1 Message Date
jabunovoty
4188b22aea
feat(agnoster): add git tag to prompt (#8417)
Co-authored-by: Jakub Novotny <jakub.novotny@deutsche-boerse.com>
2023-07-25 10:31:24 +02:00
naturedamends
e564793939
feat(fino-time): add conda environment (#11785) 2023-07-25 10:25:07 +02:00
Carlo Sala
6925c44af4
fix(aliases): rename acs to als in script help
Closes #11812
2023-07-25 01:22:39 +02:00
3 changed files with 5 additions and 2 deletions

View File

@ -57,7 +57,7 @@ def pretty_print(cheatsheet, wfilter, group_list=None, groups_only=False):
pretty_print_group(key, [ alias for alias in aliases if alias[0].find(wfilter)>-1 or alias[1].find(wfilter)>-1], wfilter) pretty_print_group(key, [ alias for alias in aliases if alias[0].find(wfilter)>-1 or alias[1].find(wfilter)>-1], wfilter)
if __name__ == '__main__': if __name__ == '__main__':
parser = argparse.ArgumentParser(description="Pretty print aliases.", prog="acs") parser = argparse.ArgumentParser(description="Pretty print aliases.", prog="als")
parser.add_argument('filter', nargs="*", metavar="<keyword>", help="search aliases matching keywords") parser.add_argument('filter', nargs="*", metavar="<keyword>", help="search aliases matching keywords")
parser.add_argument('-g', '--group', dest="group_list", action='append', help="only print aliases in given groups") parser.add_argument('-g', '--group', dest="group_list", action='append', help="only print aliases in given groups")
parser.add_argument('--groups', dest='groups_only', action='store_true', help="only print alias groups") parser.add_argument('--groups', dest='groups_only', action='store_true', help="only print alias groups")

View File

@ -109,7 +109,9 @@ prompt_git() {
if [[ "$(git rev-parse --is-inside-work-tree 2>/dev/null)" = "true" ]]; then if [[ "$(git rev-parse --is-inside-work-tree 2>/dev/null)" = "true" ]]; then
repo_path=$(git rev-parse --git-dir 2>/dev/null) repo_path=$(git rev-parse --git-dir 2>/dev/null)
dirty=$(parse_git_dirty) dirty=$(parse_git_dirty)
ref=$(git symbolic-ref HEAD 2> /dev/null) || ref="➦ $(git rev-parse --short HEAD 2> /dev/null)" ref=$(git symbolic-ref HEAD 2> /dev/null) || \
ref="◈ $(git describe --exact-match --tags HEAD 2> /dev/null)" || \
ref="➦ $(git rev-parse --short HEAD 2> /dev/null)"
if [[ -n $dirty ]]; then if [[ -n $dirty ]]; then
prompt_segment yellow black prompt_segment yellow black
else else

View File

@ -12,6 +12,7 @@
# Also borrowing from http://stevelosh.com/blog/2010/02/my-extravagant-zsh-prompt/ # Also borrowing from http://stevelosh.com/blog/2010/02/my-extravagant-zsh-prompt/
function virtualenv_info { function virtualenv_info {
[ $CONDA_DEFAULT_ENV ] && echo "($CONDA_DEFAULT_ENV) "
[ $VIRTUAL_ENV ] && echo '('`basename $VIRTUAL_ENV`') ' [ $VIRTUAL_ENV ] && echo '('`basename $VIRTUAL_ENV`') '
} }