LinuxCommandLibrary

yadm-enter

Enter a managed directory

TLDR

Run a sub-shell with all Git variables set

$ yadm enter
copy

Exit the sub-shell
$ exit
copy

SYNOPSIS

yadm enter [command]

PARAMETERS

command
    An optional command to execute within the YADM environment. If provided, `yadm-enter` will execute the command and exit. If omitted, an interactive subshell will be spawned.

DESCRIPTION

The `yadm-enter` command provides a convenient way to enter a subshell that is aware of the YADM managed dotfile repository. It modifies the shell environment to ensure YADM commands function correctly within the repository's working directory. This is particularly useful when you want to work directly with the dotfiles and leverage YADM's version control and management capabilities without navigating to the directory manually each time or having to explicitly specify the YADM directory in every command. The shell will keep current directory state. It basically setups the current directory and shell for use with the yadm commands. This command can also be used to execute a command directly within the YADM environment, bypassing the interactive subshell.

CAVEATS

The environment changes are local to the subshell or the executed command. Exiting the subshell restores the original environment. Also, it relies on the underlying shell used and its behaviour of executing commands and setting up the prompt.

EXAMPLES

yadm enter: Opens an interactive subshell within the YADM managed directory.

yadm enter git status: Executes `git status` within the YADM managed directory and prints the output to the current shell.

HISTORY

This command is specific to the YADM dotfile manager. It was developed as part of YADM to simplify interactions with the dotfile repository by providing a pre-configured shell environment. The intent is to abstract away the complexities of environment setup and directory navigation, making it easier for users to manage their dotfiles.

SEE ALSO

yadm(1)

Copied to clipboard