mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-27 05:13:10 +00:00
Modified alias.fish to show help message when executed with 0 arguments
This commit is contained in:
parent
25f9105a97
commit
9b781c4c06
1 changed files with 3 additions and 0 deletions
|
@ -13,6 +13,9 @@ function alias --description "Legacy function for creating shellscript functions
|
||||||
set -l body
|
set -l body
|
||||||
switch (count $argv)
|
switch (count $argv)
|
||||||
|
|
||||||
|
case 0
|
||||||
|
echo "Fish implements aliases using functions. Use 'functions' builtin to see list of functions and 'functions function_name' to see function definition, type 'help alias' for more information."
|
||||||
|
return 1
|
||||||
case 1
|
case 1
|
||||||
set -l tmp (echo $argv|sed -e "s/\([^=]\)=/\1\n/")
|
set -l tmp (echo $argv|sed -e "s/\([^=]\)=/\1\n/")
|
||||||
set name $tmp[1]
|
set name $tmp[1]
|
||||||
|
|
Loading…
Reference in a new issue