Highlight when awsprofile is production

This commit is contained in:
Daniel Flanagan 2023-01-30 11:38:56 -06:00
parent 6e692eeedf
commit c888319666
Signed by: lytedev
GPG key ID: 5B2020A0F9921EF4
2 changed files with 13 additions and 3 deletions

View file

@ -25,6 +25,15 @@ function _maybe_sudo_prefix
end end
end end
function _maybe_aws_profile
if set -q AWS_PROFILE && test $AWS_PROFILE = prd
printf " "
set_color -b yellow black
printf " AWS_PROFILE=prd "
set_color -b normal normal
end
end
function _user_and_host function _user_and_host
if test $argv[1] -eq 0 if test $argv[1] -eq 0
set_color -b normal blue set_color -b normal blue
@ -101,6 +110,7 @@ function fish_prompt
_user_and_host $last_cmd_status _user_and_host $last_cmd_status
_cur_work_dir _cur_work_dir
_maybe_git_summary _maybe_git_summary
_maybe_aws_profile
_last_cmd_duration _last_cmd_duration
_maybe_jobs_summary _maybe_jobs_summary
_user_prompt _user_prompt

View file

@ -1,6 +1,6 @@
# Beware! This file is rewritten by htop when settings are changed in the interface. # Beware! This file is rewritten by htop when settings are changed in the interface.
# The parser is also very primitive, and not human-friendly. # The parser is also very primitive, and not human-friendly.
htop_version=3.2.0 htop_version=3.2.1
config_reader_min_version=3 config_reader_min_version=3
fields=0 48 17 18 38 39 40 2 46 47 49 1 fields=0 48 17 18 38 39 40 2 46 47 49 1
hide_kernel_threads=1 hide_kernel_threads=1
@ -37,14 +37,14 @@ column_meter_modes_0=1 1 1
column_meters_1=RightCPUs2 Tasks LoadAverage Uptime column_meters_1=RightCPUs2 Tasks LoadAverage Uptime
column_meter_modes_1=1 2 2 2 column_meter_modes_1=1 2 2 2
tree_view=0 tree_view=0
sort_key=46 sort_key=47
tree_sort_key=0 tree_sort_key=0
sort_direction=-1 sort_direction=-1
tree_sort_direction=1 tree_sort_direction=1
tree_view_always_by_pid=0 tree_view_always_by_pid=0
all_branches_collapsed=0 all_branches_collapsed=0
screen:Main=PID USER PRIORITY NICE M_VIRT M_RESIDENT M_SHARE STATE PERCENT_CPU PERCENT_MEM TIME Command screen:Main=PID USER PRIORITY NICE M_VIRT M_RESIDENT M_SHARE STATE PERCENT_CPU PERCENT_MEM TIME Command
.sort_key=PERCENT_CPU .sort_key=PERCENT_MEM
.tree_sort_key=PID .tree_sort_key=PID
.tree_view=0 .tree_view=0
.tree_view_always_by_pid=0 .tree_view_always_by_pid=0