1
0
mirror of https://github.com/TheLocehiliosan/yadm synced 2026-03-02 03:49:29 +00:00

Add enter function for easier interaction with git repo.

Run a subshell with all git variables set. This can be used to easily
interact with your git repository. This is also useful if you are using
Emacs Tramp and magit to manage your directory.

Signed-off-by: Sébastien Gross <seb•ɑƬ•chezwam•ɖɵʈ•org>
This commit is contained in:
Sébastien Gross
2017-03-21 11:53:13 +01:00
parent a78fe20c5d
commit 831461e91e
2 changed files with 25 additions and 1 deletions

9
yadm
View File

@@ -53,7 +53,7 @@ function main() {
#; parse command line arguments
local retval=0
internal_commands="^(alt|bootstrap|clean|clone|config|decrypt|encrypt|help|init|list|perms|version)$"
internal_commands="^(alt|bootstrap|clean|clone|config|decrypt|encrypt|enter|help|init|list|perms|version)$"
if [ -z "$*" ] ; then
#; no argumnts will result in help()
help
@@ -408,6 +408,13 @@ function encrypt() {
}
function enter() {
require_repo
echo "Entering repo"
$SHELL
echo "Leaving repo"
}
function git_command() {
require_repo