From f15dd314e06f2debe29d41e5f89b46a233cbecf1 Mon Sep 17 00:00:00 2001 From: Mahmoud Al-Qudsi Date: Thu, 27 Sep 2018 17:21:12 -0500 Subject: [PATCH] Revert "Add `hash` function for compatibility with sh/bash" This reverts commit dbd228cc75d29cbc46445f22d8f2c6285fc40021. --- CHANGELOG.md | 1 - share/functions/hash.fish | 10 ---------- 2 files changed, 11 deletions(-) delete mode 100644 share/functions/hash.fish diff --git a/CHANGELOG.md b/CHANGELOG.md index 8ed15f048..39da8a5d4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -68,7 +68,6 @@ fish 3.0 is a major release which brings with it both improvements in functional - `test` and `[` now support floating point values in numeric comparisons. - Autosuggestions try to avoid arguments that are already present in the command line. - Variables may be used inside commands (#154). -- A `hash` function has been added for compatibiility with `sh` and `bash` - `while` sets `$status` to a more useful value (#4982) ## Other significant changes diff --git a/share/functions/hash.fish b/share/functions/hash.fish deleted file mode 100644 index d449a4725..000000000 --- a/share/functions/hash.fish +++ /dev/null @@ -1,10 +0,0 @@ -# Under (ba)sh, `hash` acts like a caching `which`, but it doesn't print -# anything on success. Its return code is used to determine success vs failure. -function hash - if not set -q argv[1] - echo "Usage: hash FILE" >&2 - return 1 - end - which $argv[1] 2>/dev/null 1>/dev/null - or printf "%s: not found!\n" $argv[1] >&2 && return 2 # ENOENT -end