Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add quotes to hash file autocomplete #7398

Merged
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Prev Previous commit
Next Next commit
quote dirs with hash
  • Loading branch information
merelymyself committed Dec 8, 2022
commit 5d615850eae35ca4d422a5ab0d480332f970603c
4 changes: 2 additions & 2 deletions crates/nu-cli/src/completions/directory_completions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -136,8 +136,8 @@ pub fn directory_completion(
file_name.push(SEP);
}

// Fix files or folders with quotes
if path.contains('\'') || path.contains('"') || path.contains(' ') {
// Fix files or folders with quotes or hash
if path.contains('\'') || path.contains('"') || path.contains(' ') || path.contains('#') {
path = format!("`{}`", path);
}

Expand Down