diff options
author | Konrad Borowski <glitchmr@myopera.com> | 2013-08-14 18:43:09 +0300 |
---|---|---|
committer | Konrad Borowski <glitchmr@myopera.com> | 2013-08-14 18:43:09 +0300 |
commit | 5818289c2da8e53b8b52b69064254576ba7d839a (patch) | |
tree | 20b55f6c9bcbcdc1f6f4dfec98bcc5436e109480 /share/config.fish | |
parent | d407d680eaea4afb9eef384a003b10c5f6aafcd7 (diff) |
Deprecate "." command. Fixes #310.
Needs documentation (for the new name), but manages to move . to source,
while preserving compatibility.
Diffstat (limited to 'share/config.fish')
-rw-r--r-- | share/config.fish | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/share/config.fish b/share/config.fish index 056fd34f..e0b07bf9 100644 --- a/share/config.fish +++ b/share/config.fish @@ -109,3 +109,16 @@ function __fish_on_interactive --on-event fish_prompt functions -e __fish_on_interactive end +# "." command for compatibility with old fish versions. +function . --description 'Evaluate contents of file (deprecated, see "source")' + if begin + test (count $argv) -eq 0 + # Uses tty directly, as isatty depends on "." + and tty 0>&0 >/dev/null + end + echo "source: '.' command is deprecated, and doesn't work with STDIN anymore. Did you mean 'source' or './'?" >&2 + return 1 + else + source $argv + end +end |