From c1e15ef084016939ddbe645e108f75416d5b32e0 Mon Sep 17 00:00:00 2001 From: Alexey Alekhin Date: Sat, 7 May 2016 02:05:37 +0200 Subject: FAQ: Synchronise code to add fish to /etc/shells with README (cherry picked from commit 01e5ca5c9679b8745f660469afc1995c3c44f3fd) Signed-off-by: David Adam --- doc_src/faq.hdr | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc_src/faq.hdr b/doc_src/faq.hdr index abbedb8b..bc549ee5 100644 --- a/doc_src/faq.hdr +++ b/doc_src/faq.hdr @@ -136,10 +136,10 @@ The `open` command uses the MIME type database and the `.desktop` files used by
\section faq-default How do I make fish my default shell? -If you installed fish manually (e.g. by compiling it, not by using a package manager), you first need to add fish to the list of shells by executing the following command (assuming you installed fish in /usr/local) as root: +If you installed fish manually (e.g. by compiling it, not by using a package manager), you first need to add fish to the list of shells by executing the following command (assuming you installed fish in /usr/local): \fish{cli-dark} -echo /usr/local/bin/fish >>/etc/shells +echo /usr/local/bin/fish | sudo tee -a /etc/shells \endfish If you installed a prepackaged version of fish, the package manager should have already done this for you. -- cgit v1.2.3 From 4efd0dfd655097d91f871bc06c6e418a6ef2060f Mon Sep 17 00:00:00 2001 From: Vladimír Čunát Date: Sun, 8 May 2016 13:51:30 +0200 Subject: docs: fix location of generated_completions (#3010) (cherry picked from commit 100eef4e426402ebde1040dbfab8ded5a20854d1) --- doc_src/index.hdr.in | 2 +- share/tools/create_manpage_completions.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/doc_src/index.hdr.in b/doc_src/index.hdr.in index 7e889d8e..8ff60f64 100644 --- a/doc_src/index.hdr.in +++ b/doc_src/index.hdr.in @@ -396,7 +396,7 @@ By default, Fish searches the following for completions, using the first availab - A directory for systems administrators to install completions for all users on the system, usually `/etc/fish/completions`; - A directory for third-party software vendors to ship their own completions for their software, usually `/usr/share/fish/vendor_completions.d`; - The completions shipped with fish, usually installed in `/usr/share/fish/completions`; and -- Completions automatically generated from the operating system's manual, usually stored in `~/.local/share/generated_completions`. +- Completions automatically generated from the operating system's manual, usually stored in `~/.local/share/fish/generated_completions`. These paths are controlled by parameters set at build, install, or run time, and may vary from the defaults listed above. diff --git a/share/tools/create_manpage_completions.py b/share/tools/create_manpage_completions.py index 471205fe..bd15eaeb 100755 --- a/share/tools/create_manpage_completions.py +++ b/share/tools/create_manpage_completions.py @@ -903,7 +903,7 @@ def usage(script_name): -h, --help\t\tShow this help message -v, --verbose [0, 1, 2]\tShow debugging output to stderr. Larger is more verbose. -s, --stdout\tWrite all completions to stdout (trumps the --directory option) - -d, --directory [dir]\tWrite all completions to the given directory, instead of to ~/.config/fish/generated_completions + -d, --directory [dir]\tWrite all completions to the given directory, instead of to ~/.local/share/fish/generated_completions -m, --manpath\tProcess all man1 and man8 files available in the manpath (as determined by manpath) -p, --progress\tShow progress """) -- cgit v1.2.3 From 4d1e77fcae5eea22a0fc8ced80d1d4a570df4fd5 Mon Sep 17 00:00:00 2001 From: "[Redacted]" Date: Sun, 8 May 2016 10:01:57 +0200 Subject: Added completions for rmmod (#3007) (cherry picked from commit 59c8800c4d0c77d8f6490f47b78e9465aaa474e4) --- share/completions/rmmod.fish | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 share/completions/rmmod.fish diff --git a/share/completions/rmmod.fish b/share/completions/rmmod.fish new file mode 100644 index 00000000..3f6dff16 --- /dev/null +++ b/share/completions/rmmod.fish @@ -0,0 +1,8 @@ +# rmmod completion +complete -c rmmod -x -a "(/sbin/lsmod | awk 'NR > 1 {print \$1}')" + +complete -c rmmod -s h -l help -d "Prints the help text." +complete -c rmmod -s s -l syslog -d "Send errors to syslog instead of standard error." +complete -c rmmod -s v -l verbose -d "Print messages about what the program is doing." +complete -c rmmod -s V -l version -d "Show version of program and exit" +complete -c rmmod -s f -l force -d "With this option, you can remove modules which are being used, or which are not designed to be removed, or have been marked as unsafe" -- cgit v1.2.3 From 46b819a26502a203e4a6c3d1f296789a98d787e9 Mon Sep 17 00:00:00 2001 From: Fabian Homborg Date: Sat, 7 May 2016 19:48:01 +0200 Subject: docs: Mention cartesian product in variable-expansion section See #3002. (cherry picked from commit 1d101ef3d01a7a8f7e651527fc81ee4bd4588ac5) --- doc_src/index.hdr.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc_src/index.hdr.in b/doc_src/index.hdr.in index 8ff60f64..58b13bb6 100644 --- a/doc_src/index.hdr.in +++ b/doc_src/index.hdr.in @@ -522,7 +522,7 @@ echo The plural of $WORD is {$WORD}s Note that without the quotes or braces, fish will try to expand a variable called `$WORDs`, which may not exist. -The latter syntax `{$WORD}` works by exploiting brace expansion; care should be taken with array variables and undefined variables, as these behave very differently to POSIX shells. +The latter syntax `{$WORD}` works by exploiting brace expansion; care should be taken with array variables and undefined variables, as these expand as a cartesian product, so undefined variables eliminate the string. Variable expansion is the only type of expansion performed on double quoted strings. There is, however, an important difference in how variables are expanded when quoted and when unquoted. An unquoted variable expansion will result in a variable number of arguments. For example, if the variable `$foo` has zero elements or is undefined, the argument `$foo` will expand to zero elements. If the variable $foo is an array of five elements, the argument `$foo` will expand to five elements. When quoted, like `"$foo"`, a variable expansion will always result in exactly one argument. Undefined variables will expand to the empty string, and array variables will be concatenated using the space character. -- cgit v1.2.3 From c53951b9b3a340de049c6b5417b99f88f4427f47 Mon Sep 17 00:00:00 2001 From: Daniel Bergmann Date: Sat, 7 May 2016 03:05:44 -0700 Subject: Add tags to completion list for git show. (#2998) (cherry picked from commit ac47100a7d89d53fa2c44c7de692617741387f38) --- share/completions/git.fish | 1 + 1 file changed, 1 insertion(+) diff --git a/share/completions/git.fish b/share/completions/git.fish index e4e0ba36..1f25d9fd 100644 --- a/share/completions/git.fish +++ b/share/completions/git.fish @@ -245,6 +245,7 @@ complete -f -c git -n "__fish_git_using_command remote; and __fish_seen_subcomma complete -f -c git -n '__fish_git_needs_command' -a show -d 'Shows the last commit of a branch' complete -f -c git -n '__fish_git_using_command show' -a '(__fish_git_branches)' -d 'Branch' complete -f -c git -n '__fish_git_using_command show' -a '(__fish_git_unique_remote_branches)' -d 'Remote branch' +complete -f -c git -n '__fish_git_using_command show' -a '(__fish_git_tags)' --description 'Tag' complete -f -c git -n '__fish_git_using_command show' -a '(__fish_git_commits)' # TODO options -- cgit v1.2.3 From 768277a312e1f91248d00d80af814d2c6721dc85 Mon Sep 17 00:00:00 2001 From: ridiculousfish Date: Fri, 13 May 2016 12:10:17 -0700 Subject: Remove the errant newline in __fish_cancel_commandline again (cherry picked from commit 149e601743f2ad85df8a3bd0cc857bfd0387ef67) --- share/functions/__fish_cancel_commandline.fish | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/share/functions/__fish_cancel_commandline.fish b/share/functions/__fish_cancel_commandline.fish index fb378f25..e48d32ad 100644 --- a/share/functions/__fish_cancel_commandline.fish +++ b/share/functions/__fish_cancel_commandline.fish @@ -9,7 +9,7 @@ function __fish_cancel_commandline # # Set reverse fg/bg color mode, output ^C, restore normal mode, clear to EOL (to erase any # autosuggestion). - echo (tput smso)"^C"(tput rmso)(tput el) + echo -n (tput smso)"^C"(tput rmso)(tput el) for i in (seq (commandline -L)) echo "" end -- cgit v1.2.3 From ade6ebf5226e67aa5d5fa64ad56921d69f03f4e9 Mon Sep 17 00:00:00 2001 From: ridiculousfish Date: Thu, 19 May 2016 13:00:40 -0700 Subject: Update docs to reflect new if/while condtion chaining Documents new behavior in #1428 Cherry picked from 30ea7cc3f8a5d56ad30dc749ea374363c15f312a --- doc_src/and.txt | 7 ++++--- doc_src/if.txt | 7 +++---- doc_src/or.txt | 8 ++++---- doc_src/while.txt | 9 ++++----- 4 files changed, 15 insertions(+), 16 deletions(-) diff --git a/doc_src/and.txt b/doc_src/and.txt index 0b4f681d..ce09285f 100644 --- a/doc_src/and.txt +++ b/doc_src/and.txt @@ -7,11 +7,12 @@ COMMAND1; and COMMAND2 \subsection and-description Description -`and` is used to execute a command if the current exit status (as set by the last previous command) is 0. +`and` is used to execute a command if the current exit status (as set by the previous command) is 0. -`and` does not change the current exit status. +`and` statements may be used as part of the condition in an `and` or `while` block. See the documentation +for `if` and `while` for examples. -The exit status of the last foreground command to exit can always be accessed using the $status variable. +`and` does not change the current exit status. The exit status of the last foreground command to exit can always be accessed using the $status variable. \subsection and-example Example diff --git a/doc_src/if.txt b/doc_src/if.txt index 1cecdcd3..a30b1011 100644 --- a/doc_src/if.txt +++ b/doc_src/if.txt @@ -12,7 +12,7 @@ end `if` will execute the command `CONDITION`. If the condition's exit status is 0, the commands `COMMANDS_TRUE` will execute. If the exit status is not 0 and `else` is given, `COMMANDS_FALSE` will be executed. -In order to use the exit status of multiple commands as the condition of an if block, use `begin; ...; end` and the short circuit commands `and` and `or`. +You can use `and` or `or` in the condition. See the second example below. The exit status of the last foreground command to exit can always be accessed using the $status variable. @@ -33,9 +33,8 @@ end The following code will print "foo.txt exists and is readable" if foo.txt is a regular file and readable \fish -if begin test -f foo.txt - and test -r foo.txt - end +if test -f foo.txt + and test -r foo.txt echo "foo.txt exists and is readable" end \endfish diff --git a/doc_src/or.txt b/doc_src/or.txt index 1cd1d768..97707e06 100644 --- a/doc_src/or.txt +++ b/doc_src/or.txt @@ -7,12 +7,12 @@ COMMAND1; or COMMAND2 \subsection or-description Description -`or` is used to execute a command if the current exit status (as set by the last previous command) is not 0. +`or` is used to execute a command if the current exit status (as set by the previous command) is not 0. -`or` does not change the current exit status. - -The exit status of the last foreground command to exit can always be accessed using the $status variable. +`or` statements may be used as part of the condition in an `and` or `while` block. See the documentation +for `if` and `while` for examples. +`or` does not change the current exit status. The exit status of the last foreground command to exit can always be accessed using the $status variable. \subsection or-example Example diff --git a/doc_src/while.txt b/doc_src/while.txt index c06874d5..855edce1 100644 --- a/doc_src/while.txt +++ b/doc_src/while.txt @@ -11,12 +11,11 @@ while CONDITION; COMMANDS...; end If the exit status of `CONDITION` is non-zero on the first iteration, `COMMANDS` will not be executed at all. -Use `begin; ...; end` for complex conditions; more complex control can be achieved with `while true` containing a break. - +You can use `and` or `or` for complex conditions. Even more complex control can be achieved with `while true` containing a break. \subsection while-example Example \fish -while test -f foo.txt; echo file exists; sleep 10; end -# outputs 'file exists' at 10 second intervals as long as the file foo.txt exists. -\endfish \ No newline at end of file +while test -f foo.txt; or test -f bar.txt ; echo file exists; sleep 10; end +# outputs 'file exists' at 10 second intervals as long as the file foo.txt or bar.txt exists. +\endfish -- cgit v1.2.3 From 14b953e414caf2d52df47cdfffa8cbf3b94ae65d Mon Sep 17 00:00:00 2001 From: Jorge Bucaran Date: Sun, 1 May 2016 18:58:43 +0900 Subject: Add missing color definitions to __fish_init_1_50_0 reset. (#2987) * Add missing color definitions to __fish_init_1_50_0 reset. The values where determined by inspecting the values of: * fish_color_end * fish_color_user * fish_color_host after resetting the color theme via fish_config. * Add documentation for fish_color_user and fish_color_host. (cherry picked from commit 08c29727e01a541f54f9161e08cbb10020d9d456) --- doc_src/index.hdr.in | 4 ++++ share/functions/__fish_config_interactive.fish | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/doc_src/index.hdr.in b/doc_src/index.hdr.in index 58b13bb6..c907486d 100644 --- a/doc_src/index.hdr.in +++ b/doc_src/index.hdr.in @@ -900,6 +900,10 @@ The following variables are available to change the highlighting colors in fish: - `fish_color_autosuggestion`, the color used for autosuggestions +- `fish_color_user`, the color used to print the current username in some of fish default prompts + +- `fish_color_host`, the color used to print the current host system in some of fish default prompts + Additionally, the following variables are available to change the highlighting in the completion pager: - `fish_pager_color_prefix`, the color of the prefix string, i.e. the string that is to be completed diff --git a/share/functions/__fish_config_interactive.fish b/share/functions/__fish_config_interactive.fish index bca410ac..f8b08de6 100644 --- a/share/functions/__fish_config_interactive.fish +++ b/share/functions/__fish_config_interactive.fish @@ -46,8 +46,12 @@ function __fish_config_interactive -d "Initializations that should be performed set -q fish_color_error; or set -U fish_color_error red --bold set -q fish_color_escape; or set -U fish_color_escape cyan set -q fish_color_operator; or set -U fish_color_operator cyan + set -q fish_color_end; or set -U fish_color_end green set -q fish_color_quote; or set -U fish_color_quote brown set -q fish_color_autosuggestion; or set -U fish_color_autosuggestion 555 yellow + set -q fish_color_user; or set -U fish_color_user green + + set -q fish_color_host; or set -U fish_color_host normal set -q fish_color_valid_path; or set -U fish_color_valid_path --underline set -q fish_color_cwd; or set -U fish_color_cwd green -- cgit v1.2.3 From 245be2c2e4b0f53af39f3db5ad340bf0a0e98a76 Mon Sep 17 00:00:00 2001 From: David Adam Date: Fri, 20 May 2016 22:37:30 +0000 Subject: CHANGELOG: update for 2.3.0 --- CHANGELOG.md | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1d7e7272..d3189e8d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,21 @@ +# fish 2.3.0 (released May 20, 2016) + +There are no significant changes between 2.3.0 and 2.3b2. + +## Other notable fixes and improvements + +- `abbr` now allows non-letter keys (#2996). +- Define a few extra colours on first start (#2987). +- Multiple documentation updates. +- Added completions for rmmod (#3007). +- Improved completions for git (#2998). + +## Known issues + +- Interactive commands started from fish configuration files or from the `-c` option may, under certain circumstances, be started with incorrect terminal modes and fail to behave as expected. A fix is planned but requires further testing (#2619). + +--- + # fish 2.3b2 (released May 5, 2016) ## Significant changes @@ -12,6 +30,8 @@ - Avoid confusing the terminal line driver with non-printing characters in `fish_title` (#2453). - Improved completions for busctl, git (#2585, #2879, #2984), and netctl. +--- + # fish 2.3b1 (released April 19, 2016) ## Significant Changes @@ -67,6 +87,8 @@ - PWD shortening in the prompt can now be configured via the `fish_prompt_pwd_dir_length` variable, set to the length per path component (#2473) - fish no longer requires `/etc/fish/config.fish` to correctly start, and now ships a skeleton file that only contains some documentation (#2799) +--- + # fish 2.2.0 (released July 12, 2015) ### Significant changes ### -- cgit v1.2.3 From 7828f2303a87594092ec1a7b5407c363b49108d3 Mon Sep 17 00:00:00 2001 From: David Adam Date: Fri, 20 May 2016 22:44:47 +0000 Subject: osx/config.h: update to match current configure output --- osx/config.h | 34 +++++++++++++++++++++++++++++++++- 1 file changed, 33 insertions(+), 1 deletion(-) diff --git a/osx/config.h b/osx/config.h index a2b4e7a6..b5d86e05 100644 --- a/osx/config.h +++ b/osx/config.h @@ -248,17 +248,49 @@ /* Perform string translations with gettext */ /* #undef USE_GETTEXT */ +/* Enable extensions on AIX 3, Interix. */ +#ifndef _ALL_SOURCE +# define _ALL_SOURCE 1 +#endif +/* Enable GNU extensions on systems that have them. */ +#ifndef _GNU_SOURCE +# define _GNU_SOURCE 1 +#endif +/* Enable threading extensions on Solaris. */ +#ifndef _POSIX_PTHREAD_SEMANTICS +# define _POSIX_PTHREAD_SEMANTICS 1 +#endif +/* Enable extensions on HP NonStop. */ +#ifndef _TANDEM_SOURCE +# define _TANDEM_SOURCE 1 +#endif +/* Enable general extensions on Solaris. */ +#ifndef __EXTENSIONS__ +# define __EXTENSIONS__ 1 +#endif + + /* The size of wchar_t in bits. */ #define WCHAR_T_BITS 32 +/* Define to 1 if on MINIX. */ +/* #undef _MINIX */ + /* Macro to enable additional prototypes under BSD */ /* #undef _NETBSD_SOURCE */ +/* Define to 2 if the system does not provide POSIX.1 features except with + this defined. */ +/* #undef _POSIX_1_SOURCE */ + +/* Define to 1 if you need to in order for `stat' and other things to work. */ +/* #undef _POSIX_SOURCE */ + /* Macro to enable additional prototypes under BSD */ /* #undef __BSD_VISIBLE */ /* Macro to enable additional prototypes under Solaris */ -/* #undef __EXTENSIONS__ */ +#define __EXTENSIONS__ 1 #if __GNUC__ >= 3 #ifndef __warn_unused -- cgit v1.2.3 From 216a45edee502c081dccfd8be85d27ab125fe829 Mon Sep 17 00:00:00 2001 From: David Adam Date: Fri, 20 May 2016 22:48:00 +0000 Subject: Bump version for VERSION --- osx/Info.plist | 2 +- osx/config.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/osx/Info.plist b/osx/Info.plist index d977fe4d..c07543b4 100644 --- a/osx/Info.plist +++ b/osx/Info.plist @@ -17,7 +17,7 @@ CFBundlePackageType APPL CFBundleShortVersionString - 2.2.991 + 2.3.0 CFBundleVersion 0.1 LSApplicationCategoryType diff --git a/osx/config.h b/osx/config.h index b5d86e05..19ce8b77 100644 --- a/osx/config.h +++ b/osx/config.h @@ -222,7 +222,7 @@ #define PACKAGE_NAME "fish" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "fish 2.3b2" +#define PACKAGE_STRING "fish 2.3.0" /* Define to the one symbol short name of this package. */ #define PACKAGE_TARNAME "fish" @@ -231,7 +231,7 @@ #define PACKAGE_URL "" /* Define to the version of this package. */ -#define PACKAGE_VERSION "2.3b2" +#define PACKAGE_VERSION "2.3.0" /* The size of `wchar_t', as computed by sizeof. */ #define SIZEOF_WCHAR_T 4 -- cgit v1.2.3