From 248265c8b4dc85f310019aa09019aa9260b9395d Mon Sep 17 00:00:00 2001 From: "Scott A. Williams" Date: Fri, 10 Mar 2023 19:38:33 -0800 Subject: [PATCH] Expand ~/ in PIP. --- qbsh.bas | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/qbsh.bas b/qbsh.bas index 578ac0f..c7dd0f8 100644 --- a/qbsh.bas +++ b/qbsh.bas @@ -291,6 +291,12 @@ If args$ = "" Or InStr(args$, "=") < 2 Then End If dest$ = Left$(args$, InStr(args$, "=") - 1) src$ = Right$(args$, Len(args$) - InStr(args$, "=")) +If InStr(dest$, "~") = 1 And InStr(dest$, "/") = 2 Then + dest$ = Environ$("HOME") + "/" + Right$(dest$, Len(dest$) - 2) +End If +If InStr(src$, "~") = 1 And InStr(src$, "/") = 2 Then + src$ = Environ$("HOME") + "/" + Right$(src$, Len(src$) - 2) +End If If Not _FileExists(src$) Then If _DirExists(src$) Then Print src$; " is a directory. Only regular files are supported for the source."