aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--builtin.c1
-rw-r--r--doc_src/doc.hdr13
-rw-r--r--etc/fish.in35
-rw-r--r--etc/fish_interactive.fish.in7
4 files changed, 38 insertions, 18 deletions
diff --git a/builtin.c b/builtin.c
index bf6b81be..984b692c 100644
--- a/builtin.c
+++ b/builtin.c
@@ -586,6 +586,7 @@ static int builtin_generic( wchar_t **argv )
}
/**
+ Output a definition of the specified function to the sb_out
stringbuffer. Used by the functions builtin.
*/
static void functions_def( wchar_t *name )
diff --git a/doc_src/doc.hdr b/doc_src/doc.hdr
index 91bd4f83..a526310f 100644
--- a/doc_src/doc.hdr
+++ b/doc_src/doc.hdr
@@ -1045,9 +1045,14 @@ where \c prompt_pwd is a shellscript function that displays a condensed version
\subsection title Programmable title
-When running in a virtual terminal, the user define the \c fish_title
-function to print a custom titlebar message. The \c fish_title
-function is executed and the output is used as a titlebar message.
+When using most virtual terminals, it is possible to set the message
+displayed in the titlebar of the terminal window. This can be done
+automatically in fish by defining the \c fish_title function. The \c
+fish_title function is executed before and after a new command is
+executed or put into the foreground and the output is used as a
+titlebar message. The $_ environment variable will always contain the
+name of the job to be put into the foreground (Or 'fish' if control is
+returning to the shell) when the fish_prompt function is called.
Example:
<p>
@@ -1173,6 +1178,7 @@ g++, javac, java, gcj, lpr, doxygen, whois, find)
- Syntax highlighting should mark cd to non-existing directories as an error
- wait shellscript
- Signal handler to save the history file before exiting from a signal
+- Support for the screen clipboard
\subsection todo-possible Possible features
@@ -1194,6 +1200,7 @@ g++, javac, java, gcj, lpr, doxygen, whois, find)
- Map variables. (export only the values. When expanding with no key specified, expand to all values.)
- Descriptions for variables using 'set -d'.
- Parse errors should when possible honor IO redirections
+- Support for writing strings like /u/l/b/foo and have them expand to /usr/local/bin/foo - perhaps through tab expansion
\subsection bugs Known bugs
diff --git a/etc/fish.in b/etc/fish.in
index c2245e96..b05a27dc 100644
--- a/etc/fish.in
+++ b/etc/fish.in
@@ -4,7 +4,7 @@
# @configure_input@
#
-# Set default search paths
+# Set default search paths for completions and shellscript functions
#
set -g fish_function_path ~/.fish.d/functions @SYSCONFDIR@/fish.d/functions @DATADIR@/fish/functions
@@ -24,7 +24,10 @@ set -g IFS \ \t\n
set -l path_list /bin /usr/bin /usr/X11R6/bin @PREFIX@/bin @optbindirs@
+#
# Root should also have the sbin directories in the path
+#
+
if test "$USER" = root
set path_list $path_list /sbin /usr/sbin /usr/local/sbin
end
@@ -39,34 +42,40 @@ end
#
-# Set some value for LANG if nothing was set before, and this is a
-# login shell. Also check for i18n information in /etc/sysconfig/i18n
+# 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
-end
-#
-# Put linux console in unicode mode. Should this be done in any other
-# situation as well?
-#
+ #
+ # Put linux consoles in unicode mode.
+ #
-if expr "$LANG" : ".*\.[Uu][Tt][Ff].*" >/dev/null
- if test linux = "$TERM"
- if which unicode_start >/dev/null
- unicode_start
+ 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.
diff --git a/etc/fish_interactive.fish.in b/etc/fish_interactive.fish.in
index 1caef740..69fa1183 100644
--- a/etc/fish_interactive.fish.in
+++ b/etc/fish_interactive.fish.in
@@ -42,7 +42,7 @@ end
#
-# Set various color values
+# Set various defaults using these throwaway functions
#
function set_default -d "Set an universal variable, unless it has already been set"
@@ -85,7 +85,10 @@ 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
@@ -96,7 +99,7 @@ set_default fish_color_history_current cyan
set_default CDPATH . ~
#
-# Remove temporary functions
+# Remove temporary functions for setting default variable values
#
functions -e set_exported_default