diff options
Diffstat (limited to 'crates/atuin-common/src')
| -rw-r--r-- | crates/atuin-common/src/utils.rs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/crates/atuin-common/src/utils.rs b/crates/atuin-common/src/utils.rs index fbf2ef82..d495de36 100644 --- a/crates/atuin-common/src/utils.rs +++ b/crates/atuin-common/src/utils.rs @@ -113,6 +113,11 @@ pub fn get_current_dir() -> String { } } +pub fn broken_symlink<P: Into<PathBuf>>(path: P) -> bool { + let path = path.into(); + path.is_symlink() && !path.exists() +} + pub fn is_zsh() -> bool { // only set on zsh env::var("ATUIN_SHELL_ZSH").is_ok() |
