Is there a way in the Fish Interactive shell for the full path to be displayed. Currently when I navigate to a directory I get the following shell.
millermj@Dodore ~/o/workspace
but I would rather see
millermj@Dodore ~/o-town/workspace
Is there a way in the Fish Interactive shell for the full path to be displayed. Currently when I navigate to a directory I get the following shell.
millermj@Dodore ~/o/workspace
but I would rather see
millermj@Dodore ~/o-town/workspace
The prompt_pwd
function determines the function to be displayed. You should be able to write your own version to get what you want.
Here's my version of prompt_pwd
that should display what you're looking for:
function prompt_pwd --description 'Print the current working directory, NOT shortened to fit the prompt'
if test "$PWD" != "$HOME"
printf "%s" (echo $PWD|sed -e 's|/private||' -e "s|^$HOME|~|")
else
echo '~'
end
end
This will display the tilde for the home directory, as usual, but removes the sed
command that only pulls the first letter from each directory when you're a few directories deep.
To edit prompt_pwd
use funced
. It will allow you to interactively alter the function. From the command line type funced prompt_pwd
. Once the prompt is displaying to your liking, use funcsave prompt_pwd
to make the behavior persist in future sessions.