File tree Expand file tree Collapse file tree 9 files changed +25
-1
lines changed
Expand file tree Collapse file tree 9 files changed +25
-1
lines changed Original file line number Diff line number Diff line change @@ -191,6 +191,8 @@ Type `fancygit -h` to see all available feature switchers on **"FEATURE SWITCHER
191191| fancygit --disable-rich-notification | Show notification area with simple symbols.
192192| fancygit --enable-bold-prompt | Show bold prompt font.
193193| fancygit --disable-bold-prompt | Show regular prompt font.
194+ | fancygit --enable-host-name | Show host name.
195+ | fancygit --disable-host-name | Hide host name.
194196| fancygit --set-user-name {name} | Set the user name.
195197| fancygit --unset-user-name | Restore the user name to default.
196198| fancygit --set-host-name {name} | Set the host name.
Original file line number Diff line number Diff line change 1111user_name:
1212host_name:
1313bold_prompt:false
14+ show_host_prompt:false
1415fresh_file
Original file line number Diff line number Diff line change @@ -40,6 +40,8 @@ case "$1" in
4040 " --disable-rich-notification" ) fancygit_config_save " show_rich_notification" " false" ;;
4141 " --enable-bold-prompt" ) fancygit_config_save " bold_prompt" " true" ;;
4242 " --disable-bold-prompt" ) fancygit_config_save " bold_prompt" " false" ;;
43+ " --enable-host-name" ) fancygit_config_save " show_host_prompt" " true" ;;
44+ " --disable-host-name" ) fancygit_config_save " show_host_prompt" " false" ;;
4345
4446 # Set Name and Host.
4547 " --set-user-name" ) fancygit_config_save " user_name" " $2 " ;;
Original file line number Diff line number Diff line change @@ -27,6 +27,8 @@ _fancygit() {
2727 --disable-rich-notification \
2828 --enable-bold-prompt \
2929 --disable-bold-prompt \
30+ --enable-host-name \
31+ --disable-host-name \
3032 --set-user-name \
3133 --unset-user-name \
3234 --set-host-name \
Original file line number Diff line number Diff line change @@ -35,6 +35,8 @@ FEATURE SWITCHER COMMANDS:
3535 fancygit --disable-rich-notification Show notification area with simple symbols.
3636 fancygit --enable-bold-prompt Show bold prompt font.
3737 fancygit --disable-bold-prompt Show regular prompt font.
38+ fancygit --enable-host-name Show host name.
39+ fancygit --disable-host-name Hide host name.
3840
3941THEME COMMANDS:
4042 fancygit --theme-default Change prompt to the default theme.
Original file line number Diff line number Diff line change @@ -113,6 +113,11 @@ fancygit_theme_builder() {
113113 prompt_user=" ${user_at_host}${user}${user_name}${none}${at} @${none}${host}${host_name}${none} ${user_at_host_end} "
114114 fi
115115
116+ if fancygit_config_is " show_host_prompt" " false"
117+ then
118+ prompt_user=" ${user_at_host}${user}${user_name}${none}${none} ${user_at_host_end} "
119+ fi
120+
116121 branch_name=$( fancygit_git_get_branch)
117122 if [ " " = " $branch_name " ]
118123 then
Original file line number Diff line number Diff line change @@ -106,6 +106,11 @@ fancygit_theme_builder() {
106106 prompt_user_at_host=" ${user}${user_name}${color_reset}${at} at ${color_reset}${host}${host_name}${color_reset}${user_at_host_end} in "
107107 fi
108108
109+ if fancygit_config_is " show_host_prompt" " false"
110+ then
111+ prompt_user_at_host=" ${user}${user_name}${color_reset} in "
112+ fi
113+
109114 if fancygit_config_is " bold_prompt" " true"
110115 then
111116 bold_prompt=" $( tput bold) "
Original file line number Diff line number Diff line change @@ -68,6 +68,11 @@ fancygit_theme_builder() {
6868 user_at_host=" $user$at$host :"
6969 fi
7070
71+ if fancygit_config_is " show_host_prompt" " false"
72+ then
73+ user_at_host=" $user :"
74+ fi
75+
7176 if [ " " != " $venv_name " ]
7277 then
7378 venv_name=" ($venv_name ) "
Original file line number Diff line number Diff line change 33# Author: Diogo Alexsander Cavilha <diogocavilha@gmail.com>
44# Date: 11.17.2017
55
6- export FANCYGIT_VERSION=" 7.3 .0"
6+ export FANCYGIT_VERSION=" 7.4 .0"
You can’t perform that action at this time.
0 commit comments