From ea998b03f236be4e8af73474d994af5bbc4b0287 Mon Sep 17 00:00:00 2001 From: axel Date: Thu, 19 Oct 2006 21:50:23 +1000 Subject: First stab at directory transition. Test with care... darcs-hash:20061019115023-ac50b-30c3fd51d8af8a616d63dfcac39370d7fe6d144e.gz --- etc/config.fish.in | 66 +++++++++++++++++++++++++++ etc/fish.in | 64 --------------------------- etc/fish_interactive.fish.in | 103 ------------------------------------------- 3 files changed, 66 insertions(+), 167 deletions(-) create mode 100644 etc/config.fish.in delete mode 100644 etc/fish.in delete mode 100644 etc/fish_interactive.fish.in (limited to 'etc') diff --git a/etc/config.fish.in b/etc/config.fish.in new file mode 100644 index 00000000..648fcac9 --- /dev/null +++ b/etc/config.fish.in @@ -0,0 +1,66 @@ +# +# Init file for fish +# +# @configure_input@ + +# +# Set default field separators +# + +set -g IFS \ \t\n + +# +# Some things should only be done for login terminals +# + +if status --is-login + + # + # Set some value for LANG if nothing was set before, and this is a + # login shell. + # + + if not set -q LANG >/dev/null + set -gx LANG en_US.UTF-8 + end + + # Check for i18n information in + # /etc/sysconfig/i18n + + if test -f /etc/sysconfig/i18n + eval (cat /etc/sysconfig/i18n |sed -ne 's/^\([a-zA-Z]*\)=\(.*\)$/set -gx \1 \2;/p') + end + + # + # Put linux consoles in unicode mode. + # + + if expr "$LANG" : ".*\.[Uu][Tt][Ff].*" >/dev/null + if test "$TERM" = linux + if which unicode_start >/dev/null + unicode_start + end + end + end +end + +# +# There are variables that contain colons that are not arrays. This +# reverts them back to regular strings. +# + +for i in DISPLAY + if set -q $i + set -- $i (printf ":%s" $$i|cut -c 2-) + end +end + +# +# Load additional initialization files +# + +if test -d include + for i in include/*.fish + . $i + end +end \ No newline at end of file diff --git a/etc/fish.in b/etc/fish.in deleted file mode 100644 index 1c85fb28..00000000 --- a/etc/fish.in +++ /dev/null @@ -1,64 +0,0 @@ -# -# Init file for fish -# -# @configure_input@ - -# -# Set default field separators -# - -set -g IFS \ \t\n - -# -# Some things should only be done for login terminals -# - -if status --is-login - - # - # Set some value for LANG if nothing was set before, and this is a - # login shell. - # - - if not set -q LANG >/dev/null - set -gx LANG en_US.UTF-8 - end - - # Check for i18n information in - # /etc/sysconfig/i18n - - if test -f /etc/sysconfig/i18n - eval (cat /etc/sysconfig/i18n |sed -ne 's/^\([a-zA-Z]*\)=\(.*\)$/set -gx \1 \2;/p') - end - - # - # Put linux consoles in unicode mode. - # - - if expr "$LANG" : ".*\.[Uu][Tt][Ff].*" >/dev/null - if test "$TERM" = linux - if which unicode_start >/dev/null - unicode_start - end - end - end -end - -# -# There are variables that contain colons that are not arrays. This -# reverts them back to regular strings. -# - -for i in DISPLAY - if set -q $i - set -- $i (printf ":%s" $$i|cut -c 2-) - end -end - -# -# Load additional initialization files -# - -for i in fish.d/*.fish - . $i -end diff --git a/etc/fish_interactive.fish.in b/etc/fish_interactive.fish.in deleted file mode 100644 index 4e96daba..00000000 --- a/etc/fish_interactive.fish.in +++ /dev/null @@ -1,103 +0,0 @@ -# -# Initializations that should only be performed when in interactive mode -# -# @configure_input@ - -if not status --is-interactive - exit -end - -# -# Set exit message -# - -function fish_on_exit -d (_ "Commands to execute when fish exits") --on-process %self - printf (_ "Good bye\n") -end - -# -# Set INPUTRC to something nice -# -# We override INPUTRC if already set, since it may be set by a shell -# other than fish, which may use a different file. The new value should -# be exported, since the fish inputrc file plays nice with other files -# by including them when found. -# Give priority to the default file installed with fish in -# @sysconfdir@/fish_inputrc. -# - -for i in ~/.fish_inputrc @sysconfdir@/fish_inputrc ~/.inputrc /etc/inputrc - if test -f $i - set -xg INPUTRC $i - break - end -end - - -# -# Set various defaults using these throwaway functions -# - -function set_default -d "Set an universal variable, unless it has already been set" - if not set -q $argv[1] - set -U -- $argv - end - if not set -q $argv[1] - set -g -- $argv - end -end - -function set_exported_default -d "Set an exported universal variable, unless it has already been set" - if not set -q $argv[1] - set -Ux -- $argv - end - if not set -q $argv[1] - set -gx -- $argv - end -end - - -# Regular syntax highlighting colors -set_default fish_color_normal normal -set_default fish_color_command green -set_default fish_color_redirection normal -set_default fish_color_comment red -set_default fish_color_error red --bold -set_default fish_color_escape cyan -set_default fish_color_operator cyan -set_default fish_color_quote brown -set_default fish_color_valid_path --underline - -set_default fish_color_cwd green - -# Background color for matching quotes and parenthesis -set_default fish_color_match cyan - -# Background color for search matches -set_default fish_color_search_match purple - -# Pager colors -set_default fish_pager_color_prefix cyan -set_default fish_pager_color_completion normal -set_default fish_pager_color_description normal -set_default fish_pager_color_progress cyan - -# -# Directory history colors -# - -set_default fish_color_history_current cyan - - -# -# Setup the CDPATH variable -# - -set_default CDPATH . ~ - -# -# Remove temporary functions for setting default variable values -# - -functions -e set_exported_default -functions -e set_default -- cgit v1.2.3