a
This commit is contained in:
@@ -56,6 +56,13 @@ def build_ps1_prompt() -> str:
|
||||
|
||||
return f'{green}{user_host} ($({local_ip_cmd})):{work_dir}{prompt_symbol} {reset}'
|
||||
|
||||
def get_plain_user_host_ip() -> str:
|
||||
"""
|
||||
Returns a plain text command that outputs user@host (ip) format
|
||||
without PS1 formatting strings - just the actual values
|
||||
"""
|
||||
return 'echo "$(whoami)@$(hostname) ($(hostname -I | awk \'{print $1}\'))"'
|
||||
|
||||
# Alias building utilities
|
||||
def create_bash_function(func_name: str, func_body: str) -> str:
|
||||
"""
|
||||
@@ -123,6 +130,9 @@ export PS1="{build_ps1_prompt()}"
|
||||
# Tail the last modified file in current directory
|
||||
{build_tail_last_alias()}
|
||||
|
||||
{create_alias_with_function('lss', '_lss_func', 'systemctl status lightspeed.service')}
|
||||
{create_alias_with_function('cdm', '_cdm_func', 'cd /home/multihomingproxy/logs')}
|
||||
|
||||
echo "Bash customizations sourced successfully!"
|
||||
'''
|
||||
|
||||
|
||||
Reference in New Issue
Block a user