Open amtoine opened 1 year ago
e.g. this command which might need to be reworked if the enter
command gets removed from nushhell
:+1:
def list-repos [] {
ghq list
| lines
| str replace $"($env.GIT_REPOS_HOME)/" ""
| str replace "/.git$" ""
| sort --ignore-case
}
export def-env "repo enter" [] {
let choice = (
list-repos
| to text
| fzf --ansi --prompt "Please choose a repo to enter: "
| str trim
)
if ($choice | is-empty) {
print "user choose to exit..."
return
}
enter ($env.GIT_REPOS_HOME | path join $choice)
print "Opened shells:"
shells
}
from the discord server
def get-commit-file [] {
git rev-parse --show-toplevel
| str trim
| path join ".git" "gcf-commit-msg.txt"
}
export def gcf [] {
let file = (get-commit-file)
git commit -F $file
"" | save -f $file
}
export def gcfe [] {
^$env.EDITOR (get-commit-file)
}
in the
nushell/nu_scripts
repo, we have the following files that could be interesting at some pointthere are also a bunch of things scattered around in my
nu_scripts
:+1: especiallygf
moduledotfiles
module