mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-05-15 06:31:13 -03:00
Add example of string manipulation to prompt_pwd
This commit is contained in:
@@ -55,3 +55,9 @@ Examples
|
||||
|
||||
>_ prompt_pwd --full-length-dirs=2 --dir-length=1
|
||||
/t/b/s/with/mustard
|
||||
|
||||
>_ echo (prompt_pwd | string split /)[-1]
|
||||
mustard
|
||||
|
||||
>_ echo (string join / (prompt_pwd | string split /)[-3..-1])
|
||||
s/with/mustard
|
||||
|
||||
Reference in New Issue
Block a user