mirror of
https://github.com/js0ny/dotfiles.git
synced 2025-12-21 16:53:00 +00:00
35 lines
1 KiB
PowerShell
35 lines
1 KiB
PowerShell
# $DOTFILES/tools\powershell\Aliases.ps1
|
|
# Date: 2024-12-01
|
|
# Author: js0ny
|
|
# Aliases for PowerShell
|
|
### VARIABLES ###
|
|
$EDITOR = "code"
|
|
# Shell Equivalents #
|
|
Set-Alias "touch" "New-Item"
|
|
${function:l} = { Get-ChildItem -Force }
|
|
${function:tree} = { lsd.exe --tree $args }
|
|
Set-Alias "which" "Get-Command"
|
|
|
|
# Shell Configurations #
|
|
${function:pulldots} = { Set-Location -Path $DOTFILES && git pull }
|
|
|
|
# Editors #
|
|
Set-Alias "v" "nvim"
|
|
Set-Alias "c" "code"
|
|
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 }
|
|
|
|
### Dev ###
|
|
|
|
# Python & Conda #
|
|
Set-Alias "py" "python"
|
|
Set-Alias "ipy" "ipython"
|
|
|
|
if ($isWindows) {
|
|
function kex { wsl -d kali-linux kex --sl -s }
|
|
}
|