From 2a616698b371627cea91588ab772285cbde068ff Mon Sep 17 00:00:00 2001 From: Fabian Homborg Date: Thu, 3 May 2018 12:42:09 +0200 Subject: [PATCH] Just define `:` compatibility function directly There really is no need for that indirection. --- share/config.fish | 12 ++++++------ share/functions/colon.fish | 5 ----- 2 files changed, 6 insertions(+), 11 deletions(-) delete mode 100644 share/functions/colon.fish diff --git a/share/config.fish b/share/config.fish index 9f08d0ca9..59fa7f505 100644 --- a/share/config.fish +++ b/share/config.fish @@ -105,12 +105,12 @@ if not contains -- $__fish_data_dir/completions $fish_complete_path set fish_complete_path $fish_complete_path $__fish_data_dir/completions end -# : is a sh/bash-compatibility function, but because its name can cause problems on many -# systems, it is saved as colon.fish and not :.fish, which means that it's never autoloaded -# since the name of the file and the name of the function differ. Force evaluation of colon.fish -# as a function by simply trying to load the non-existent function colon, which will pull in -# colon.fish and lead to `:` being recognized. Sourced up here so it can be used later safely. -type -q colon; or true # just to reset $status +# This cannot be in an autoload-file because `:.fish` is an invalid filename on windows. +function : + # no-op function for compatibility with sh, bash, and others. + # Often used to insert a comment into a chain of commands without having + # it eat up the remainder of the line, handy in Makefiles. +end # # This is a Solaris-specific test to modify the PATH so that diff --git a/share/functions/colon.fish b/share/functions/colon.fish deleted file mode 100644 index b41ad1e4e..000000000 --- a/share/functions/colon.fish +++ /dev/null @@ -1,5 +0,0 @@ -function : - # no-op function for compatibility with sh, bash, and others. - # Often used to insert a comment into a chain of commands without having - # it eat up the remainder of the line, handy in Makefiles. -end