mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-27 05:13:10 +00:00
Remove a few calls to the test command in favour of the switch builtin to speed statup up
darcs-hash:20070922190734-75c98-0e63a0ed6685edc2c9aa941f0b26c14466c7af6a.gz
This commit is contained in:
parent
1420744669
commit
5ecd0e22bf
2 changed files with 11 additions and 3 deletions
|
@ -83,7 +83,11 @@ function __fish_config_interactive -d "Initializations that should be performed
|
|||
set -U fish_greeting $line1\n$line2
|
||||
end
|
||||
|
||||
if test "$fish_greeting"
|
||||
switch $fish_greeting
|
||||
case ''
|
||||
# If variable is empty, don't print anything, saves us a fork
|
||||
|
||||
case '*'
|
||||
echo $fish_greeting
|
||||
end
|
||||
|
||||
|
|
|
@ -3,12 +3,16 @@
|
|||
# Also drop '/private' directories on OS X.
|
||||
#
|
||||
|
||||
if test (uname) = Darwin
|
||||
switch (uname)
|
||||
|
||||
case Darwin
|
||||
function pwd --description "Print working directory"
|
||||
echo $PWD | sed -e 's|/private||' -e "s|^$HOME|~|"
|
||||
end
|
||||
else
|
||||
|
||||
case '*'
|
||||
function pwd --description "Print working directory"
|
||||
echo $PWD | sed -e "s|^$HOME|~|"
|
||||
end
|
||||
|
||||
end
|
Loading…
Reference in a new issue