From 0586715696dd2700ba7d857fcca8944e804bcfc7 Mon Sep 17 00:00:00 2001 From: Fabian Homborg Date: Thu, 1 Apr 2021 13:55:50 +0200 Subject: [PATCH] Sample prompts: Remove duplicated or less useful prompts The "classic" prompts are all just variations on a theme, let's just keep the default classic+vcs. "Justadollar" is very unlikely to be what you want and also trivial to write yourself. I have no idea what screen_savvy even is for - it reacts to "$WINDOW", but I don't know anything that even uses that variable. Lonetwin is just unremarkable, and the debian chroot prompt has one special feature that should be integrated into the other prompts. --- .../web_config/sample_prompts/classic.fish | 20 ----------- .../sample_prompts/classic_status.fish | 28 --------------- .../sample_prompts/debian_chroot.fish | 35 ------------------- .../sample_prompts/justadollar.fish | 4 --- .../web_config/sample_prompts/lonetwin.fish | 6 ---- .../sample_prompts/screen_savvy.fish | 9 ----- 6 files changed, 102 deletions(-) delete mode 100644 share/tools/web_config/sample_prompts/classic.fish delete mode 100644 share/tools/web_config/sample_prompts/classic_status.fish delete mode 100644 share/tools/web_config/sample_prompts/debian_chroot.fish delete mode 100644 share/tools/web_config/sample_prompts/justadollar.fish delete mode 100644 share/tools/web_config/sample_prompts/lonetwin.fish delete mode 100644 share/tools/web_config/sample_prompts/screen_savvy.fish diff --git a/share/tools/web_config/sample_prompts/classic.fish b/share/tools/web_config/sample_prompts/classic.fish deleted file mode 100644 index 3f371e323..000000000 --- a/share/tools/web_config/sample_prompts/classic.fish +++ /dev/null @@ -1,20 +0,0 @@ -# name: Classic -function fish_prompt --description "Write out the prompt" - set -l color_cwd - set -l suffix - - if functions -q fish_is_root_user; and fish_is_root_user - if set -q fish_color_cwd_root - set color_cwd $fish_color_cwd_root - else - set color_cwd $fish_color_cwd - end - - set suffix '#' - else - set color_cwd $fish_color_cwd - set suffix '>' - end - - echo -n -s "$USER" @ (prompt_hostname) ' ' (set_color $color_cwd) (prompt_pwd) (set_color normal) "$suffix " -end diff --git a/share/tools/web_config/sample_prompts/classic_status.fish b/share/tools/web_config/sample_prompts/classic_status.fish deleted file mode 100644 index f916fb5dd..000000000 --- a/share/tools/web_config/sample_prompts/classic_status.fish +++ /dev/null @@ -1,28 +0,0 @@ -# name: Classic + Status -# author: David Frascone - -function fish_prompt --description "Write out the prompt" - # Save our status - set -l last_pipestatus $pipestatus - set -lx __fish_last_status $status # Export for __fish_print_pipestatus. - - set -l color_cwd - set -l suffix - - if functions -q fish_is_root_user; and fish_is_root_user - if set -q fish_color_cwd_root - set color_cwd $fish_color_cwd_root - else - set color_cwd $fish_color_cwd - end - - set suffix '#' - else - set color_cwd $fish_color_cwd - set suffix '>' - end - - echo -n -s "$USER" @ (prompt_hostname) ' ' (set_color $color_cwd) (prompt_pwd) \ - " "(__fish_print_pipestatus "[" "]" "|" (set_color $fish_color_status) (set_color --bold $fish_color_status) $last_pipestatus) \ - (set_color normal) "$suffix " -end diff --git a/share/tools/web_config/sample_prompts/debian_chroot.fish b/share/tools/web_config/sample_prompts/debian_chroot.fish deleted file mode 100644 index 2f9ed514e..000000000 --- a/share/tools/web_config/sample_prompts/debian_chroot.fish +++ /dev/null @@ -1,35 +0,0 @@ -# name: Debian chroot -# author: Maurizio De Santis - -function fish_prompt --description 'Write out the prompt, prepending the Debian chroot environment if present' - # Set variable identifying the chroot you work in (used in the prompt below) - set -l debian_chroot $debian_chroot - - if not set -q debian_chroot[1] - and test -r /etc/debian_chroot - set debian_chroot (cat /etc/debian_chroot) - end - - if not set -q __fish_debian_chroot_prompt - and set -q debian_chroot[1] - and test -n "$debian_chroot" - set -g __fish_debian_chroot_prompt "($debian_chroot)" - end - - # Prepend the chroot environment if present - if set -q __fish_debian_chroot_prompt - echo -n -s (set_color yellow) "$__fish_debian_chroot_prompt" (set_color normal) ' ' - end - - if functions -q fish_is_root_user; and fish_is_root_user - echo -n -s "$USER" @ (prompt_hostname) ' ' (set -q fish_color_cwd_root - and set_color $fish_color_cwd_root - or set_color $fish_color_cwd) (prompt_pwd) \ - (set_color normal) '# ' - - else - echo -n -s "$USER" @ (prompt_hostname) ' ' (set_color $fish_color_cwd) (prompt_pwd) \ - (set_color normal) '> ' - - end -end diff --git a/share/tools/web_config/sample_prompts/justadollar.fish b/share/tools/web_config/sample_prompts/justadollar.fish deleted file mode 100644 index a9b438a00..000000000 --- a/share/tools/web_config/sample_prompts/justadollar.fish +++ /dev/null @@ -1,4 +0,0 @@ -# name: Just a Dollar -function fish_prompt - echo -n '$ ' -end diff --git a/share/tools/web_config/sample_prompts/lonetwin.fish b/share/tools/web_config/sample_prompts/lonetwin.fish deleted file mode 100644 index 30adf9736..000000000 --- a/share/tools/web_config/sample_prompts/lonetwin.fish +++ /dev/null @@ -1,6 +0,0 @@ -# name: lonetwin -# author: Steve - -function fish_prompt --description 'Write out the prompt' - echo -n -s "$USER" @ (prompt_hostname) ' ' (set_color $fish_color_cwd) (prompt_pwd) (fish_vcs_prompt) (set_color normal) '> ' -end diff --git a/share/tools/web_config/sample_prompts/screen_savvy.fish b/share/tools/web_config/sample_prompts/screen_savvy.fish deleted file mode 100644 index 3679b665b..000000000 --- a/share/tools/web_config/sample_prompts/screen_savvy.fish +++ /dev/null @@ -1,9 +0,0 @@ -# name: Screen Savvy -# author: Matthias -function fish_prompt -d "Screen Savvy prompt" - if test -z "$WINDOW" - printf '%s%s@%s%s%s%s%s> ' (set_color yellow) $USER (set_color purple) (prompt_hostname) (set_color $fish_color_cwd) (prompt_pwd) (set_color normal) - else - printf '%s%s@%s%s%s(%s)%s%s%s> ' (set_color yellow) $USER (set_color purple) (prompt_hostname) (set_color white) (echo $WINDOW) (set_color $fish_color_cwd) (prompt_pwd) (set_color normal) - end -end