mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-05-01 04:30:37 +02:00
Use $+functions to determine if a function exists
This commit is contained in:
parent
edd7823388
commit
6ea9aadf7a
1 changed files with 1 additions and 1 deletions
|
|
@ -187,7 +187,7 @@ prompt_hg() {
|
|||
|
||||
# Dir: current working directory
|
||||
prompt_dir() {
|
||||
if type shrink_path &>/dev/null; then
|
||||
if (( $+functions[shrink_path] )); then
|
||||
prompt_segment blue black "$(shrink_path -t -l)"
|
||||
else
|
||||
prompt_segment blue black '%~'
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue