aboutsummaryrefslogtreecommitdiffhomepage
path: root/share/tools
diff options
context:
space:
mode:
authorGravatar Michael Fogleman <michaelwfogleman@gmail.com>2015-10-14 09:04:18 -0400
committerGravatar David Adam <zanchey@ucc.gu.uwa.edu.au>2015-10-15 11:59:39 +0800
commit233c4436943fb56edf6db44b932221107b37fad1 (patch)
tree2078a8f62a6641ea64521ce2cc798f46c743a478 /share/tools
parent35bbc1d7b797892a5c673ea1eedfaa8887f6efa2 (diff)
prompts: more concise way of getting the hostname.
Diffstat (limited to 'share/tools')
-rw-r--r--share/tools/web_config/sample_prompts/classic.fish2
-rw-r--r--share/tools/web_config/sample_prompts/classic_git.fish2
-rw-r--r--share/tools/web_config/sample_prompts/classic_status.fish2
-rw-r--r--share/tools/web_config/sample_prompts/debian_chroot.fish2
-rw-r--r--share/tools/web_config/sample_prompts/informative.fish2
-rw-r--r--share/tools/web_config/sample_prompts/lonetwin.fish2
-rw-r--r--share/tools/web_config/sample_prompts/pythonista.fish2
-rw-r--r--share/tools/web_config/sample_prompts/screen_savvy.fish4
-rw-r--r--share/tools/web_config/sample_prompts/terlar.fish2
-rw-r--r--share/tools/web_config/sample_prompts/user_host_path.fish2
10 files changed, 11 insertions, 11 deletions
diff --git a/share/tools/web_config/sample_prompts/classic.fish b/share/tools/web_config/sample_prompts/classic.fish
index b092803e..e421f944 100644
--- a/share/tools/web_config/sample_prompts/classic.fish
+++ b/share/tools/web_config/sample_prompts/classic.fish
@@ -2,7 +2,7 @@
function fish_prompt --description "Write out the prompt"
# Just calculate this once, to save a few cycles when displaying the prompt
if not set -q __fish_prompt_hostname
- set -g __fish_prompt_hostname (hostname|cut -d . -f 1)
+ set -g __fish_prompt_hostname (uname -n)
end
set -l color_cwd
diff --git a/share/tools/web_config/sample_prompts/classic_git.fish b/share/tools/web_config/sample_prompts/classic_git.fish
index 888f95cb..7d0f15d7 100644
--- a/share/tools/web_config/sample_prompts/classic_git.fish
+++ b/share/tools/web_config/sample_prompts/classic_git.fish
@@ -7,7 +7,7 @@ function fish_prompt --description 'Write out the prompt'
# Just calculate this once, to save a few cycles when displaying the prompt
if not set -q __fish_prompt_hostname
- set -g __fish_prompt_hostname (hostname|cut -d . -f 1)
+ set -g __fish_prompt_hostname (uname -n)
end
set -l normal (set_color normal)
diff --git a/share/tools/web_config/sample_prompts/classic_status.fish b/share/tools/web_config/sample_prompts/classic_status.fish
index fe64f793..6779c63f 100644
--- a/share/tools/web_config/sample_prompts/classic_status.fish
+++ b/share/tools/web_config/sample_prompts/classic_status.fish
@@ -12,7 +12,7 @@ function fish_prompt --description "Write out the prompt"
# Just calculate this once, to save a few cycles when displaying the prompt
if not set -q __fish_prompt_hostname
- set -g __fish_prompt_hostname (hostname|cut -d . -f 1)
+ set -g __fish_prompt_hostname (uname -n)
end
set -l color_cwd
diff --git a/share/tools/web_config/sample_prompts/debian_chroot.fish b/share/tools/web_config/sample_prompts/debian_chroot.fish
index 80acfa9a..694c5c5d 100644
--- a/share/tools/web_config/sample_prompts/debian_chroot.fish
+++ b/share/tools/web_config/sample_prompts/debian_chroot.fish
@@ -5,7 +5,7 @@ function fish_prompt --description 'Write out the prompt, prepending the Debian
# Just calculate these once, to save a few cycles when displaying the prompt
if not set -q __fish_prompt_hostname
- set -g __fish_prompt_hostname (hostname|cut -d . -f 1)
+ set -g __fish_prompt_hostname (uname -n)
end
if not set -q __fish_prompt_normal
diff --git a/share/tools/web_config/sample_prompts/informative.fish b/share/tools/web_config/sample_prompts/informative.fish
index 749d8171..7600cf97 100644
--- a/share/tools/web_config/sample_prompts/informative.fish
+++ b/share/tools/web_config/sample_prompts/informative.fish
@@ -8,7 +8,7 @@ function fish_prompt --description 'Write out the prompt'
# Just calculate these once, to save a few cycles when displaying the prompt
if not set -q __fish_prompt_hostname
- set -g __fish_prompt_hostname (hostname|cut -d . -f 1)
+ set -g __fish_prompt_hostname (uname -n)
end
if not set -q __fish_prompt_normal
diff --git a/share/tools/web_config/sample_prompts/lonetwin.fish b/share/tools/web_config/sample_prompts/lonetwin.fish
index 67478594..cd56e43b 100644
--- a/share/tools/web_config/sample_prompts/lonetwin.fish
+++ b/share/tools/web_config/sample_prompts/lonetwin.fish
@@ -4,7 +4,7 @@
function fish_prompt --description 'Write out the prompt'
# Just calculate these once, to save a few cycles when displaying the prompt
if not set -q __fish_prompt_hostname
- set -g __fish_prompt_hostname (hostname -s)
+ set -g __fish_prompt_hostname (uname -n)
end
if not set -q __fish_prompt_normal
diff --git a/share/tools/web_config/sample_prompts/pythonista.fish b/share/tools/web_config/sample_prompts/pythonista.fish
index ad772e2f..b36e8ba4 100644
--- a/share/tools/web_config/sample_prompts/pythonista.fish
+++ b/share/tools/web_config/sample_prompts/pythonista.fish
@@ -12,7 +12,7 @@ function fish_prompt
printf ' at '
set_color magenta
- printf '%s' (hostname|cut -d . -f 1)
+ printf '%s' (uname -n)
set_color normal
printf ' in '
diff --git a/share/tools/web_config/sample_prompts/screen_savvy.fish b/share/tools/web_config/sample_prompts/screen_savvy.fish
index 83c7db64..8590ce2c 100644
--- a/share/tools/web_config/sample_prompts/screen_savvy.fish
+++ b/share/tools/web_config/sample_prompts/screen_savvy.fish
@@ -2,8 +2,8 @@
# author: Matthias
function fish_prompt -d "Write out the prompt"
if test -z $WINDOW
- printf '%s%s@%s%s%s%s%s> ' (set_color yellow) (whoami) (set_color purple) (hostname|cut -d . -f 1) (set_color $fish_color_cwd) (prompt_pwd) (set_color normal)
+ printf '%s%s@%s%s%s%s%s> ' (set_color yellow) (whoami) (set_color purple) (uname -n) (set_color $fish_color_cwd) (prompt_pwd) (set_color normal)
else
- printf '%s%s@%s%s%s(%s)%s%s%s> ' (set_color yellow) (whoami) (set_color purple) (hostname|cut -d . -f 1) (set_color white) (echo $WINDOW) (set_color $fish_color_cwd) (prompt_pwd) (set_color normal)
+ printf '%s%s@%s%s%s(%s)%s%s%s> ' (set_color yellow) (whoami) (set_color purple) (uname -n) (set_color white) (echo $WINDOW) (set_color $fish_color_cwd) (prompt_pwd) (set_color normal)
end
end
diff --git a/share/tools/web_config/sample_prompts/terlar.fish b/share/tools/web_config/sample_prompts/terlar.fish
index d75b17b5..85f4c61c 100644
--- a/share/tools/web_config/sample_prompts/terlar.fish
+++ b/share/tools/web_config/sample_prompts/terlar.fish
@@ -13,7 +13,7 @@ function fish_prompt --description 'Write out the prompt'
# Host
set_color $fish_color_host
- echo -n (hostname -s)
+ echo -n (uname -n)
set_color normal
echo -n ':'
diff --git a/share/tools/web_config/sample_prompts/user_host_path.fish b/share/tools/web_config/sample_prompts/user_host_path.fish
index de917ee7..dbc321a0 100644
--- a/share/tools/web_config/sample_prompts/user_host_path.fish
+++ b/share/tools/web_config/sample_prompts/user_host_path.fish
@@ -9,5 +9,5 @@ function fish_prompt -d "Write out the prompt"
case root toor; set prompt_symbol '#'
case '*'; set prompt_symbol '$'
end
- printf "[%s@%s %s%s%s]%s " $USER (hostname -s) (set_color $fish_color_cwd) $pwd (set_color normal) $prompt_symbol
+ printf "[%s@%s %s%s%s]%s " $USER (uname -n) (set_color $fish_color_cwd) $pwd (set_color normal) $prompt_symbol
end