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

1475 fix home envvar #1621

Merged
merged 6 commits into from
Feb 9, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 4 additions & 2 deletions src/api/CompileTools.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ export namespace CompileTools {
variables.set(`{usrprf}`, connection.currentUser);
variables.set(`&HOST`, connection.currentHost);
variables.set(`{host}`, connection.currentHost);
variables.set(`&HOME`, config.homeDirectory);
richardm90 marked this conversation as resolved.
Show resolved Hide resolved
variables.set(`&WORKDIR`, config.homeDirectory);

const libraryList = buildLibraryList(librarySettings);
variables.set(`&LIBLS`, libraryList.join(` `));
Expand Down Expand Up @@ -232,6 +232,7 @@ export namespace CompileTools {
fullPath = path.posix.join(config.homeDirectory, relativePath).split(path.sep).join(path.posix.sep);
variables.set(`&FULLPATH`, fullPath);
variables.set(`{path}`, fullPath);
variables.set(`&FILEDIR`, path.posix.parse(fullPath).dir);

try {
const gitApi = Tools.getGitAPI();
Expand All @@ -251,11 +252,12 @@ export namespace CompileTools {
break;

case `streamfile`:
relativePath = path.posix.relative(config.homeDirectory, uri.fsPath).split(path.sep).join(path.posix.sep);
relativePath = path.posix.relative(config.homeDirectory, uri.path).split(path.sep).join(path.posix.sep);
variables.set(`&RELATIVEPATH`, relativePath);

const fullName = uri.path;
variables.set(`&FULLPATH`, fullName);
variables.set(`&FILEDIR`, path.parse(fullName).dir);
break;
}

Expand Down
5 changes: 3 additions & 2 deletions src/locale/ids/da.ts
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ export const da: Locale = {
//Actions
'actions.CURLIB': 'Aktuelle bibliotek (sættes i Library List)',
'actions.USERNAME': `Brugernavn for forbindelsen`,
'actions.HOME': `Aktuelle mappe (sættes i IFS Browser)`,
'actions.WORKDIR': `Aktuel arbejdsmappe, kan ændres i IFS Browser`,
'actions.HOST': `Host navn eller IP adresse fra den aktuelle forbindelse`,
'actions.BUILDLIB': `Det samme som <code>&amp;CURLIB</code>`,
'actions.LIBLC': `Liste af biblioteker adskilt af komma`,
Expand All @@ -219,7 +219,8 @@ export const da: Locale = {
'actions.OPENMBR': `Navn på source member (<code>&amp;OPENMBRL</code> for små bogstaver)`,
'actions.member.EXT': `Type af source member (<code>&amp;EXTL</code> for små bogstaver)`,
'actions.FULLPATH': `Fulde sti på filen på fjernsystemet`,
'actions.RELATIVEPATH': `Relative sti for filen fra aktuelle mappe eller workspace`,
'actions.FILEDIR': `Katalog over filen på fjernsystemet`,
'actions.RELATIVEPATH': `Relativ sti til streamfilen fra arbejdsbiblioteket eller arbejdsområdet`,
'actions.PARENT': `Navn på forrige mappe eller source fil`,
'actions.BASENAME': `Navn på filen, inklusive filtypen`,
'actions.streamfile.NAME': `Navn på filen (<code>&amp;NAMEL</code> for små bogstaver)`,
Expand Down
5 changes: 3 additions & 2 deletions src/locale/ids/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ export const en: Locale = {
//Actions
'actions.CURLIB': 'Current library, changeable in Library List',
'actions.USERNAME': `Username for connection`,
'actions.HOME': `Current home/working directory, changable in IFS Browser`,
'actions.WORKDIR': `Current working directory, changeable in IFS Browser`,
'actions.HOST': `Hostname or IP address from the current connection`,
'actions.BUILDLIB': `The same as <code>&amp;CURLIB</code>`,
'actions.LIBLC': `Library list delimited by comma`,
Expand All @@ -219,7 +219,8 @@ export const en: Locale = {
'actions.OPENMBR': `Name of the source member (<code>&amp;OPENMBRL</code> for lowercase)`,
'actions.member.EXT': `Extension of the source member (<code>&amp;EXTL</code> for lowercase)`,
'actions.FULLPATH': `Full path of the file on the remote system`,
'actions.RELATIVEPATH': `Relative path of the streamfile from the home directory or workspace`,
'actions.FILEDIR': `Directory of the file on the remote system`,
'actions.RELATIVEPATH': `Relative path of the streamfile from the working directory or workspace`,
'actions.PARENT': `Name of the parent directory or source file`,
'actions.BASENAME': `Name of the file, including the extension`,
'actions.streamfile.NAME': `Name of the file (<code>&amp;NAMEL</code> for lowercase)`,
Expand Down
5 changes: 3 additions & 2 deletions src/locale/ids/fr.ts
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ export const fr: Locale = {
//Actions
'actions.CURLIB': 'Bibliothèque en cours, modifiable depuis la Liste des Bibliothèques',
'actions.USERNAME': `Nom d'utilisateur de la connexion`,
'actions.HOME': `Home/répertoire de travail en cours, modifiable depuis l'Exporateur IFS`,
'actions.WORKDIR': `Répertoire de travail actuel, modifiable dans le navigateur IFS`,
'actions.HOST': `Nom d'hôte ou adresse IP de la connexion`,
'actions.BUILDLIB': `Voir <code>&amp;CURLIB</code>`,
'actions.LIBLC': `Liste des bilbiothèques, séparée par des virgules`,
Expand All @@ -219,7 +219,8 @@ export const fr: Locale = {
'actions.OPENMBR': `Nom du membre source (<code>&amp;OPENMBRL</code> pour le nom en minuscule)`,
'actions.member.EXT': `Extension du membre source (<code>&amp;EXTL</code> pour le nom en minuscule)`,
'actions.FULLPATH': `Chemin absolu du fichier sur le système distant`,
'actions.RELATIVEPATH': `Chemin relatif du fichier depuis le répertoire home ou de travail`,
'actions.FILEDIR': `Répertoire du fichier sur le système distant`,
'actions.RELATIVEPATH': `Chemin relatif du fichier de flux à partir du répertoire de travail ou de l'espace de travail`,
'actions.PARENT': `Nom du répertoire parent du fichier`,
'actions.BASENAME': `Nom du fichier avec son extension`,
'actions.streamfile.NAME': `Nom du fichier (<code>&amp;NAMEL</code> pour le nom en minuscule)`,
Expand Down
3 changes: 2 additions & 1 deletion src/webviews/actions/varinfo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ type VariableInfoList = {
const generic: () => VariableInfo[] = () => [
{ name: `&amp;CURLIB`, text: t(`actions.CURLIB`) },
{ name: `&amp;USERNAME`, text: t("actions.USERNAME")},
{ name: `&amp;HOME`, text: t("actions.HOME")},
{ name: `&amp;WORKDIR`, text: t("actions.WORKDIR")},
{ name: `&amp;HOST`, text: t("actions.HOST")},
{ name: `&amp;BUILDLIB`, text: t("actions.BUILDLIB")},
{ name: `&amp;LIBLC`, text: t("actions.LIBLC")},
Expand All @@ -33,6 +33,7 @@ export function getVariablesInfo(): VariableInfoList {
],
streamFile: [
{ name: `&amp;FULLPATH`, text: t("actions.FULLPATH")},
{ name: `&amp;FILEDIR`, text: t("actions.FILEDIR")},
{ name: `&amp;RELATIVEPATH`, text: t("actions.RELATIVEPATH")},
{ name: `&amp;PARENT`, text: t("actions.PARENT")},
{ name: `&amp;BASENAME`, text: t("actions.BASENAME")},
Expand Down