mirror of
https://github.com/opensiriusfox/windows-bash.git
synced 2025-06-16 20:31:19 -07:00
added a few helper scripts for npp/kate execution, and typical aliases
This commit is contained in:
parent
7063fc3930
commit
490849144c
4 changed files with 47 additions and 5 deletions
|
@ -1 +0,0 @@
|
||||||
alias ls="ls -I 'NTUSER.DAT*' --color=auto"
|
|
7
templates/aliases.bashrc.sh
Normal file
7
templates/aliases.bashrc.sh
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
alias _wrapping_fix='kill -WINCH $$'
|
||||||
|
alias grep='grep --color=auto'
|
||||||
|
alias pip='python -m pip'
|
||||||
|
alias diff='diff --strip-trailing-cr'
|
||||||
|
alias ls="ls -I 'NTUSER.DAT*' --color=auto"
|
|
@ -1,5 +1,33 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# TODO
|
function qff() {
|
||||||
function npp() {
|
printf "searching for files named '*"$*"*'\n" >&2
|
||||||
|
find -type f -iname '*'$*'*'
|
||||||
|
}
|
||||||
|
|
||||||
|
function rv() {
|
||||||
|
RV=$?
|
||||||
|
if [[ $RV -eq 0 ]]; then
|
||||||
|
COLOR='2'
|
||||||
|
elif [[ $RV -eq 1 ]]; then
|
||||||
|
COLOR='3'
|
||||||
|
else
|
||||||
|
COLOR='1'
|
||||||
|
fi
|
||||||
|
printf '\e[4%dm' $COLOR
|
||||||
|
printf ' RV=%d \e[0m\n' $RV >&2
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
# When notepad++ is available, use it
|
||||||
|
function kate() {
|
||||||
|
export IFS=$'\n'
|
||||||
|
NOTEPADPP_EXE='/c/Program Files/Notepad++/notepad++.exe'
|
||||||
|
if [[ -e "${NOTEPADPP_EXE}" ]]; then
|
||||||
|
echo 'notepad++.exe '$*' &'
|
||||||
|
"${NOTEPADPP_EXE}" $* &
|
||||||
|
return 0
|
||||||
|
else
|
||||||
|
echo "notepad++ not found."
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
}
|
}
|
8
templates/misc.bashrc.sh
Normal file
8
templates/misc.bashrc.sh
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
|
||||||
|
# prevent git from paging
|
||||||
|
export LESS='-rFX'
|
||||||
|
|
||||||
|
export HISTIGNORE='pwd:exit:fg:bg:top:clear:history:ls:uptime:df'
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue