mirror of
https://github.com/fish-shell/fish-shell.git
synced 2025-03-27 14:45:13 +08:00
Only hide /private directories under OS X
darcs-hash:20060206181717-ac50b-043020858020be5dc55c34240329916696f5892a.gz
This commit is contained in:
parent
57d53c70e3
commit
08251dcc98
@ -175,10 +175,8 @@ end
|
|||||||
# application for the file.
|
# application for the file.
|
||||||
#
|
#
|
||||||
|
|
||||||
function open -d "Open file in default application"
|
if not test (uname) = Darwin
|
||||||
if test (uname) = Darwin
|
function open -d "Open file in default application"
|
||||||
open $argv
|
|
||||||
else
|
|
||||||
mimedb -l -- $argv
|
mimedb -l -- $argv
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@ -188,12 +186,23 @@ end
|
|||||||
# function is used by the default prompt command.
|
# function is used by the default prompt command.
|
||||||
#
|
#
|
||||||
|
|
||||||
function prompt_pwd -d "Print the current working directory, shortend to fit the prompt"
|
if test (uname) = Darwin
|
||||||
if test "$PWD" != "$HOME"
|
function prompt_pwd -d "Print the current working directory, shortend to fit the prompt"
|
||||||
printf "%s" (echo $PWD|sed -e 's|/private||' -e "s|^$HOME|~|" -e 's-/\([^/]\)\([^/]*\)-/\1-g')
|
if test "$PWD" != "$HOME"
|
||||||
echo $PWD|sed -e 's-.*/[^/]\([^/]*$\)-\1-'
|
printf "%s" (echo $PWD|sed -e 's|/private||' -e "s|^$HOME|~|" -e 's-/\([^/]\)\([^/]*\)-/\1-g')
|
||||||
else
|
echo $PWD|sed -e 's-.*/[^/]\([^/]*$\)-\1-'
|
||||||
echo '~'
|
else
|
||||||
|
echo '~'
|
||||||
|
end
|
||||||
|
end
|
||||||
|
else
|
||||||
|
function prompt_pwd -d "Print the current working directory, shortend to fit the prompt"
|
||||||
|
if test "$PWD" != "$HOME"
|
||||||
|
printf "%s" (echo $PWD|sed -e "s|^$HOME|~|" -e 's-/\([^/]\)\([^/]*\)-/\1-g')
|
||||||
|
echo $PWD|sed -e 's-.*/[^/]\([^/]*$\)-\1-'
|
||||||
|
else
|
||||||
|
echo '~'
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user