mirror of
https://codeberg.org/hyperreal/nushell-config
synced 2024-11-01 16:53:12 +01:00
Update
This commit is contained in:
parent
406b019fec
commit
a87d147b29
15
config.nu
15
config.nu
@ -1,6 +1,4 @@
|
|||||||
# Nushell Config File
|
# Nushell Config File
|
||||||
#
|
|
||||||
# version = "0.90.1"
|
|
||||||
|
|
||||||
# Command existence checker function
|
# Command existence checker function
|
||||||
def 'is-installed' [ app: string ] {
|
def 'is-installed' [ app: string ] {
|
||||||
@ -41,6 +39,15 @@ source $DISTRO_CONFIG
|
|||||||
# ALIASES / CUSTOM COMMANDS
|
# ALIASES / CUSTOM COMMANDS
|
||||||
#
|
#
|
||||||
|
|
||||||
|
# Copy nushell config to git repo
|
||||||
|
def cpnurepo [] {
|
||||||
|
let repo = ($nu.home-path | path join "repos/codeberg.org/hyperreal/nushell-config")
|
||||||
|
cp -v $nu.config-path $repo
|
||||||
|
cp -v $nu.env-path $repo
|
||||||
|
cp -rfv $MODDIR $repo
|
||||||
|
echo "Nushell config copied to local repo"
|
||||||
|
}
|
||||||
|
|
||||||
# Custom commands for Doom Emacs
|
# Custom commands for Doom Emacs
|
||||||
def doomdoc [] { ~/.config/emacs/bin/doom doctor }
|
def doomdoc [] { ~/.config/emacs/bin/doom doctor }
|
||||||
def dsync [] { ~/.config/emacs/bin/doom sync }
|
def dsync [] { ~/.config/emacs/bin/doom sync }
|
||||||
@ -162,7 +169,7 @@ def tstampz [] { date now | format date "%FT%T%:z" }
|
|||||||
def --env mkd [path] { mkdir $path; cd $path }
|
def --env mkd [path] { mkdir $path; cd $path }
|
||||||
|
|
||||||
# Display pid info of command
|
# Display pid info of command
|
||||||
def pids [cmd] { ps | where name == "$cmd" }
|
def pids [cmd] { ps | where name == $cmd }
|
||||||
|
|
||||||
# Get time in specific time zone
|
# Get time in specific time zone
|
||||||
def whattimein [string] {
|
def whattimein [string] {
|
||||||
@ -197,7 +204,7 @@ def caseify [case: string, filename: path] {
|
|||||||
|
|
||||||
# Select a host to SSH into
|
# Select a host to SSH into
|
||||||
def nussh [] {
|
def nussh [] {
|
||||||
let ssh_host = (ssh ssh-list | get Host | input list $"(ansi yellow)Which host to SSH into?(ansi reset)")
|
let ssh_host = (ssh ssh-list | get Host | input list $"\n(ansi red)Which host to SSH into?(ansi reset)")
|
||||||
if ($ssh_host | describe) != "string" {
|
if ($ssh_host | describe) != "string" {
|
||||||
echo "Operation cancelled"
|
echo "Operation cancelled"
|
||||||
return
|
return
|
||||||
|
Loading…
Reference in New Issue
Block a user