mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-27 05:13:10 +00:00
parent
f980125fb9
commit
38ac21ba5e
1 changed files with 1 additions and 1 deletions
|
@ -17,7 +17,7 @@ function alias --description 'Creates a function wrapping a command'
|
||||||
for func in (functions -n)
|
for func in (functions -n)
|
||||||
set -l output (functions $func | string match -r -- "^function .* --description (?:'alias (.*)'|alias\\\\ (.*))\$")
|
set -l output (functions $func | string match -r -- "^function .* --description (?:'alias (.*)'|alias\\\\ (.*))\$")
|
||||||
if set -q output[2]
|
if set -q output[2]
|
||||||
set output (string replace -r -- '^'$func'[= ]' '' $output[2])
|
set output (string replace -r -- '^'(string escape --style=regex -- $func)'[= ]' '' $output[2])
|
||||||
echo alias $func (string escape -- $output[1])
|
echo alias $func (string escape -- $output[1])
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue