* use $XDG_CACHE_HOME for __fish_print_packages completion caches
* when starting fishd, redirect fishd output to /dev/null, not a
predictable path
Fix for CVE-2014-3219.
Closes#1440.
When you chroot in Debian, bash shows the chroot environment in the prompt:
```bash
...
if [ -z "${debian_chroot:-}" ] && [ -r /etc/debian_chroot ]; then
debian_chroot=$(cat /etc/debian_chroot)
fi
PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ '
...
```
This is the effect:
```
(chroot_env) user@host:~#
```
It is useful when chrooting, since usually the hostname remains the same and thus you can't distinguish where you are.
Fix for CVE-2014-2906.
Closes a race condition in funced which would allow execution of
arbitrary code; closes a race condition in psub which would allow
alternation of the data stream.
Note that `psub -f` does not work (#1040); a fix should be committed
separately for ease of maintenance.
Closes#1437
The if statement checking the output of hg bookmarks uses two conditions
joined by the or keyword. However, only the first part was being used.
Wrapping the two statements with begin and end properly combines them.
At some point the non-verbose, non-informative variant of the prompt
(e.g. the variant that looks like the bash prompt) was modified to try
and show the behind/ahead counts the same way the informative prompt
does. Besides being wrong, it also didn't work because behind/ahead
weren't defined.
Before this change, fish config used 0 as its address. However, this
isn't a good idea from security point of view, as web service can be
accessed from everywhere, and do anything on the account it was ran on.
This also deals with firewalls which block the access to 0 even from
the host machine itself. It possibly might fix#673, but I'm not sure.
Previously, fish's command_not_found handler would be installed in
__fish_config_interactive. Errors that occured early in startup (e.g. in
config.fish) or in non-interactive mode would therefore not be reported.
With this change, fish now exposes its default cnf handler as
__fish_default_command_not_found_handler . config.fish then installs a
cnfh that invokes the default. When fish goes interactive, the initial
cnfh is overwritten with a fancier one, that may in turn fall back to
invoking the default.
commit d81ae2665f
Author: Max Gonzih <gonzih@gmail.com>
Date: Sun Feb 2 16:22:18 2014 +0300
Check for command-not-found command on suse
commit 004b794c82
Author: Max Gonzih <gonzih@gmail.com>
Date: Sun Feb 2 14:04:41 2014 +0300
Fix cnf handler for Suse and Fedora
fixes#1208
Presently, `isatty` only works on a handful of keywords. Here it
is rewritten to be able to take any path, device or fd number as
an argument, and eliminates errors printed to stdout.
Per discussion in #1228, using `builtin test -c` within a pipe to
test special file descriptors is not viable, so this implementation
specifcially uses `command test`. Additionally, a note has been
added to the documentation of `test` regarding this potential
aberration from the expected output of the test utility under the
'Standards' section.
Comment out 'o' binding
Add '['/']' bindings to navigate current token history
Fix 'P' to paste indeed
Add "*P/"*p to insert current selection clipboard using xsel
These options will be passed to the bind command.
Now it's possible to call
fish_default_key_bindings -M insert
to set all original bindings to the insert mode
The following normal mode bindings are added:
o, I, A, gg, G, g^, g$, x, X, backspace, d*, D, s, S, c*, C, ~, gu,
gU, J, K, y*, Y, p, P
I was not able to add binding for 'O'
dd now deletes the whole line as vim, while D deletes the line to the
end. c, s, y act the same way
It would be nice if this would work without this hack,
but until then, this has to work. Requires you to reinstall
the prompt using fish configuration system.
Continuation of https://github.com/fish-shell/fish-shell/pull/1195/.
Removes use of --delimiter and --fields with cut(1) as these are GNU
extensions.
Note that a number of completions use these options, but as they are
only for GNU/Linux-specific tools have remained unmodified.
This was a really stupid change that I should have tested more
before pushing. It broke any non-interactive usage, such as SSH,
fish config, or parsing the script output, as config.fish is
loaded for everything.
There are no issues with different terminal emulators, so this
change will be pushed in the future, but only running in interactive
mode. I apologize for any issues caused by this commit.
This reverts commit d61adfbc53.
Some people like to have their terminals claim UTF-8 support when
their terminals actually are set to another encoding. As nobody
appears to understand this, I have made a change to automatically
fix the encoding problems if possible. This uses ISO 2022 sequences
in order to dynamically change the encoding.
Fixes#692. Fixes#895. Fixes possible future issues about this.
* Show color scheme title in preview box
* Show information about setting terminal background color on Apply
button mouse hover
* Added text_color_for_color method in colors controller scope
From the Python webbrowser documentation:
"If text-mode browsers are used, the calling process will block until the user exits the browser."
Running fish_config on an ssh server with no GUI browser will open a CLI browser which blocks and stops the server from handling requests.
Using multiprocess to run the server in the background lets CLI browsers access the page, but the page is unusable.
For now, disable CLI browsers and recommend opening the page in a graphical browser.
In the future, maybe write a CLI utility to change prompts and delete history items.
Prefer the standard library lzma module if available. This change prevents
using the backports-lzma when it is installed for a version of Python that
already has the lzma module in its standard library.
They cannot be used as arguments (Perl thinks it's version check, but
version checks are pointless for oneliners), and Debian puts path
containing version depending directories (like 5.14.2) in Perl path.
There is no need to explicitly check for two arguments and set --bold.
Instead the user can simply "set __fish_git_prompt_color_flags --bold
red".
The current check violates the expectation set by the documentation
that you can use any set_color argument as the current code interprets
"--bold red" as "--bold --bold" instead.
Plus, by passing the full contents of the variable directly, the user
can do more adventurous things like set the background as well.
git.git's git-prompt may not contain a configurable prefix, but it
does display a space before the upstream information when displaying
verbose information. Rather than using a space always or never,
default to a space whenever verbose is in showupstream.
Adds a "name" option to __fish_git_prompt_showupstream that shows an
abbreviated branch name when the upstream type is verbose.
Based on git.git 1f6806c: git-prompt.sh: optionally show upstream
branch name