Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

home | help
prompt_pwd(1)			     fish			 prompt_pwd(1)

NAME
       prompt_pwd -- Print pwd suitable	for prompt

   Synopsis
       prompt_pwd

   Description
       prompt_pwd is a function	to print the current working directory in a
       way suitable for	prompts. It will replace the home directory with '~'
       and shorten every path component	but the	last to	a default of one
       character.

       To change the number of characters per path component, set
       $fish_prompt_pwd_dir_length to the number of characters.	Setting	it to
       0 or an invalid value will disable shortening entirely.

   Examples
       > cd ~/
       > echo $PWD
       /home/alfa

       > prompt_pwd
       ~

       > cd /tmp/banana/sausage/with/mustard
       > prompt_pwd
       /t/b/s/w/mustard

       > set -g	fish_prompt_pwd_dir_length 3
       > prompt_pwd
       /tmp/ban/sau/wit/mustard

Version	2.5.0			Fri Feb	3 2017			 prompt_pwd(1)

NAME

Want to link to this manual page? Use this URL:
<https://www.freebsd.org/cgi/man.cgi?query=prompt_pwd&sektion=1&manpath=FreeBSD+12.0-RELEASE+and+Ports>

home | help