mirror of
https://github.com/fish-shell/fish-shell
synced 2024-09-21 15:01:53 +00:00
Silence error messages from cut
darcs-hash:20050924021157-ac50b-296a425d89aea044fe8dc9991d74fe0cc9761382.gz
This commit is contained in:
parent
79b8ff535e
commit
495c83a26c
1 changed files with 2 additions and 2 deletions
|
@ -212,7 +212,7 @@ function prompt_pwd -d "Print the current working directory, ellipsise it if it
|
|||
set ellipsis \u2026
|
||||
end
|
||||
end
|
||||
printf %s%s $ellipsis (echo $wd|cut -c (echo $len-$max_width-1|bc)-)
|
||||
printf %s%s $ellipsis (echo $wd|cut -c (echo $len-$max_width-1|bc)- ^/dev/null )
|
||||
else
|
||||
echo $wd
|
||||
end
|
||||
|
@ -226,7 +226,7 @@ function pwd -d "Print working directory"
|
|||
set out (command pwd $argv)
|
||||
if echo $out| grep \^$HOME >/dev/null
|
||||
printf \~
|
||||
echo $out |cut -b (echo $HOME|wc -c)-
|
||||
echo $out |cut -b (echo $HOME|wc -c)- ^/dev/null
|
||||
else
|
||||
printf "%s\n" $out
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue