mirror of
https://github.com/rwinkhart/MUTN.git
synced 2026-08-27 20:36:29 -04:00
Fix PowerShell completions not completing after directories containing spaces
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
function cliMUTNEntryCompleter {
|
||||
param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)
|
||||
#$mutnPath = (Resolve-Path '~/.local/share/libmutton').Path # UNIX testing
|
||||
$mutnPath = (Resolve-Path '~/AppData/Local/libmutton/entries').Path
|
||||
$mutnPath = (Resolve-Path '~\AppData\Local\libmutton\entries').Path
|
||||
try {
|
||||
$trimmedPaths = If (Test-Path $mutnPath) {
|
||||
(Get-ChildItem -Path $mutnPath -Recurse -File).FullName.Substring($mutnPath.Length) -replace '\\', '/' -replace ' ', '` '
|
||||
(Get-ChildItem -Path $mutnPath -Recurse -File).FullName.Substring($mutnPath.Length) -replace '\\', '/' -replace ' ', [char]0x23bd
|
||||
}
|
||||
} catch {
|
||||
$trimmedPaths = $null # if any errors occur (especially, "You cannot call a method on a null-valued expression", set $trimmedPaths to $null
|
||||
@@ -50,6 +50,6 @@ function mutn {
|
||||
[string]$option
|
||||
)
|
||||
|
||||
#Invoke-Expression -Command ('/usr/local/bin/mutn ' + ($entry -replace ' ', '` '), $argument, $option).Trim() # UNIX testing
|
||||
Invoke-Expression -Command ('./mutn.exe ' + ($entry -replace ' ', '` '), $argument, $option).Trim()
|
||||
#Invoke-Expression -Command ('/usr/local/bin/mutn ' + ($entry -replace ' ', '` ' -replace [char]0x1a, '` '), $argument, $option).Trim() # UNIX testing
|
||||
Invoke-Expression -Command ('mutn.exe ' + ($entry -replace ' ', '` ' -replace [char]0x23bd, '` '), $argument, $option).Trim()
|
||||
}
|
||||
|
||||
+1
-2
@@ -1,7 +1,6 @@
|
||||
## Windows Quirks
|
||||
MUTN for Windows is fully functional, though it does exhibit a few quirks/bugs not found on other platforms. Watch out for these, and if you have the know-how, pull requests addressing them are welcomed!
|
||||
MUTN for Windows is fully functional, though it does exhibit a couple quirks/bugs not found on other platforms. Watch out for these, and if you have the know-how, pull requests addressing them are welcomed!
|
||||
|
||||
- Reading entries (especially those containing Markdown notes) often results in failure to interpret ANSI escape codes, leading to the raw escape codes being dumped to stdout. This happens seemingly randomly and re-running the exact same command ALWAYS yields the correct output. It's like the terminal has to "warm up" to ASNI escape codes or something. **Help wanted**.
|
||||
- GPG is sometimes (seems unpredictable) incredibly slow to start on Windows (often after a reboot), leading to many operations seemingly hanging
|
||||
- **This will be addressed** in the migration off of GPG that will take place before v1.0.0
|
||||
- PowerShell tab completions will not complete after a directory name if the directory contains a space
|
||||
Reference in New Issue
Block a user