mirror of
https://github.com/js0ny/dotfiles.git
synced 2025-12-21 16:53:00 +00:00
chezmoi: powershell
This commit is contained in:
parent
81da252906
commit
298b2290a8
13 changed files with 308 additions and 278 deletions
|
|
@ -1,41 +0,0 @@
|
|||
# $DOTFILES/tools\powershell\Aliases.ps1
|
||||
# Date: 2024-12-01
|
||||
# Author: js0ny
|
||||
# Aliases for PowerShell
|
||||
|
||||
# Unix Shell Equivalents #
|
||||
Set-Alias "touch" "New-Item"
|
||||
${function:l} = { Get-ChildItem -Force }
|
||||
${function:tree} = { lsd --tree $args }
|
||||
Set-Alias "which" "Get-Command"
|
||||
|
||||
# Editors #
|
||||
Set-Alias "v" "nvim"
|
||||
Set-Alias "c" "code"
|
||||
Get-Command neovide -ErrorAction SilentlyContinue > $null && Set-Alias "gvi" "neovide"
|
||||
|
||||
|
||||
|
||||
# File Creation #
|
||||
function mkcd { param ( [string] $dirname) New-Item -ItemType Directory -Name $dirname && Set-Location $dirname }
|
||||
function tc { param ( [string] $filename) New-Item $filename && code $filename }
|
||||
function tv { param ( [string] $filename) New-Item $filename && nvim $filename }
|
||||
function cdls { param( [string] $dirname) Set-Location $dirname && Get-ChildItem }
|
||||
function zls { param( [string] $dirname) z $dirname && Get-ChildItem }
|
||||
function zl { param( [string] $dirname) z $dirname && lsd }
|
||||
function mt { param( [string] $dirname) New-Item -ItemType File -Name $dirname -Force }
|
||||
|
||||
|
||||
### Dev ###
|
||||
|
||||
# Python & Conda #
|
||||
Set-Alias "py" "python"
|
||||
Set-Alias "ipy" "ipython"
|
||||
|
||||
if ($Env:WEZTERM) {
|
||||
# Environment variable injected by wezterm/wezterm.lua
|
||||
${function:icat} = { wezterm imgcat $args }
|
||||
}
|
||||
elseif ($Env:KITTY) {
|
||||
${function:icat} = { kitty +kitten icat $args }
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue