env::prettyPwd
prettyPwd()
prettyPwd(options: Dictionary)
Parameter | Type | Description |
---|---|---|
(optional) options | Dictionary | A dictionary such as the one shown in the example below. |
Returns
(String) A string containing a modified version of the path to the current directory (the value of $PWD). The names of all the directories in the path except for the last one are replaced with their first letter, and '/home/user' is replaced with a tilde.
Example
elk
prettyPwd() #=> ~/P/e/src
prettyPwd({
"wordColor": "brightBlue", # The color of the folder names (see: `ansi::color`)
"slashColor": "blue", # The color of the slashes (and tilde)
"wholeFolderNameAmount": "2", # The amount of folder names that should *not* be shortened (default: nil)
})
# => ~/P/elk/src
prettyPwd() #=> ~/P/e/src
prettyPwd({
"wordColor": "brightBlue", # The color of the folder names (see: `ansi::color`)
"slashColor": "blue", # The color of the slashes (and tilde)
"wholeFolderNameAmount": "2", # The amount of folder names that should *not* be shortened (default: nil)
})
# => ~/P/elk/src