From 19487f950f1c28fd8403d8ce320300c0b8517b82 Mon Sep 17 00:00:00 2001 From: Mitsuo Tokumori Date: Thu, 23 Nov 2023 22:01:36 -0500 Subject: Define EDITOR and VISUAL env vars --- bash/bash_aliases | 3 ++- bash/bashrc | 12 +++++++++++- powershell/Microsoft.PowerShell_profile.ps1 | 19 ------------------- windows/powershell/Microsoft.PowerShell_profile.ps1 | 19 +++++++++++++++++++ 4 files changed, 32 insertions(+), 21 deletions(-) delete mode 100644 powershell/Microsoft.PowerShell_profile.ps1 create mode 100644 windows/powershell/Microsoft.PowerShell_profile.ps1 diff --git a/bash/bash_aliases b/bash/bash_aliases index b3dcf78..899f80f 100644 --- a/bash/bash_aliases +++ b/bash/bash_aliases @@ -26,10 +26,11 @@ alias diff='diff --color=always' alias dir='dir --color=auto' alias grep='grep --color=auto -i' # color case-insensitive # Sort files by ASCII value (override current locale) -alias ls='LC_ALL=C ls --color=auto --group-directories-first --classify' +alias ls='ls --color=auto --group-directories-first --classify' alias la='ls -A' alias ll='ls -l -h' alias lla='ll -A' +alias ip='ip --color=auto' alias gcc='gcc -g -std=c99 -lm' alias ed='ed -p "* "' diff --git a/bash/bashrc b/bash/bashrc index d3216d2..7f0abff 100644 --- a/bash/bashrc +++ b/bash/bashrc @@ -7,6 +7,17 @@ # If not running interactively, don't do anything [[ $- != *i* ]] && return +# TROUBLESHOOTING +# =============== + +export EDITOR=nvim +export VISUAL=nvim +export TERM=xterm-256color # Required for AWS VPS work good when SSHing + +# https://wiki.archlinux.org/title/GnuPG#Configure_pinentry_to_use_the_correct_TTY +export GPG_TTY=$(tty) +gpg-connect-agent updatestartuptty /bye >/dev/null + # Bash configuration # ================== @@ -37,7 +48,6 @@ shopt -s checkwinsize #export GCC_COLORS='error=01;31:warning=01;35:note=01;36:caret=01;32:locus=01:quote=01' # Alias definitions. -export EDITOR=nvim if [ -f ~/.bash_aliases ]; then . ~/.bash_aliases fi diff --git a/powershell/Microsoft.PowerShell_profile.ps1 b/powershell/Microsoft.PowerShell_profile.ps1 deleted file mode 100644 index fc55bac..0000000 --- a/powershell/Microsoft.PowerShell_profile.ps1 +++ /dev/null @@ -1,19 +0,0 @@ -# Access this file using $PROFILE -# -# By default, powershell does not allow execution of non-signed scripts -# > Get-ExecutionPolicy -# > Set-ExecutionPolicy -Scope CurrentUser RemoteSigned -# -# Home directory: -# cmd.exe: %USERPROFILE% -# Powershell: $ENV:USERPROFILE -# -# To break long commands in Powershell use a trailing backtick (`) - -# Custom colored prompt -# Ref.: https://stackoverflow.com/questions/6297072 -function prompt -{ - Write-Host "PS $(get-location)`n>" -nonewline -foregroundcolor DarkCyan - return ' ' -} diff --git a/windows/powershell/Microsoft.PowerShell_profile.ps1 b/windows/powershell/Microsoft.PowerShell_profile.ps1 new file mode 100644 index 0000000..fc55bac --- /dev/null +++ b/windows/powershell/Microsoft.PowerShell_profile.ps1 @@ -0,0 +1,19 @@ +# Access this file using $PROFILE +# +# By default, powershell does not allow execution of non-signed scripts +# > Get-ExecutionPolicy +# > Set-ExecutionPolicy -Scope CurrentUser RemoteSigned +# +# Home directory: +# cmd.exe: %USERPROFILE% +# Powershell: $ENV:USERPROFILE +# +# To break long commands in Powershell use a trailing backtick (`) + +# Custom colored prompt +# Ref.: https://stackoverflow.com/questions/6297072 +function prompt +{ + Write-Host "PS $(get-location)`n>" -nonewline -foregroundcolor DarkCyan + return ' ' +} -- cgit v1.2.3