Skip to content

Commit

Permalink
Add config reset and git gone commands
Browse files Browse the repository at this point in the history
  • Loading branch information
myty committed Feb 18, 2024
1 parent 1246387 commit 53ff814
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 0 deletions.
2 changes: 2 additions & 0 deletions install.nu
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,7 @@ if (($dotfiles_symlink_path | path exists) != true) {
if ((sys).host.name == "Windows") { ^mklink /d $"($dotfiles_symlink_path)" $"($env.PWD)" } else { ^ln -s $env.PWD $dotfiles_symlink_path }
}

config reset

echo $"\n# Load config.nu\nsource ~\\.config\\dotfiles\\nushell\\config.nu" | save --raw --append $"($nu.config-path)"
echo $"\n# Load env.nu\nsource ~\\.config\\dotfiles\\nushell\\env.nu" | save --raw --append $"($nu.env-path)"
5 changes: 5 additions & 0 deletions nushell/commands.nu
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,8 @@ def "dadjoke" [] {
def bup [] {
brew update; brew upgrade; brew cleanup
}

def "git gone" [] {
# gently try to delete merged branches, excluding the checked out one
git branch --merged | lines | where $it !~ '\*' | str trim | where $it != 'master' and $it != 'main' | each { |it| git branch -d $it }
}
2 changes: 2 additions & 0 deletions nushell/env.nu
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
$env.EDITOR = 'code'

# Starship
mkdir ~/.cache/starship
starship init nu | save ~/.cache/starship/init.nu -f

0 comments on commit 53ff814

Please sign in to comment.