mirror of
https://github.com/nikdoof/dotfiles.git
synced 2025-12-13 09:42:27 +00:00
[shell-common] Cleanup tabs vs spaces
This commit is contained in:
@@ -2,5 +2,3 @@
|
|||||||
if [ -f $HOME/.bashrc ]; then
|
if [ -f $HOME/.bashrc ]; then
|
||||||
source $HOME/.bashrc
|
source $HOME/.bashrc
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -7,10 +7,10 @@ fi
|
|||||||
|
|
||||||
# Source shell common
|
# Source shell common
|
||||||
for f in ~/.config/shell-common/*.sh; do
|
for f in ~/.config/shell-common/*.sh; do
|
||||||
source $f;
|
source $f
|
||||||
done
|
done
|
||||||
|
|
||||||
# Source bash specific files
|
# Source bash specific files
|
||||||
for f in ~/.config/bash/*.bash; do
|
for f in ~/.config/bash/*.bash; do
|
||||||
source $f;
|
source $f
|
||||||
done
|
done
|
||||||
|
|||||||
@@ -1,2 +1,2 @@
|
|||||||
# SSH completion based on ssh config
|
# SSH completion based on ssh config
|
||||||
[ -e "$HOME/.ssh/config" ] && complete -o "default" -o "nospace" -W "$(grep "^Host" ~/.ssh/config* | grep -v "[?*]" | cut -d " " -f2- | tr ' ' '\n')" scp sftp ssh;
|
[ -e "$HOME/.ssh/config" ] && complete -o "default" -o "nospace" -W "$(grep "^Host" ~/.ssh/config* | grep -v "[?*]" | cut -d " " -f2- | tr ' ' '\n')" scp sftp ssh
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ urlencode() {
|
|||||||
LC_COLLATE=C
|
LC_COLLATE=C
|
||||||
|
|
||||||
local length="${#1}"
|
local length="${#1}"
|
||||||
for (( i = 0; i < length; i++ )); do
|
for ((i = 0; i < length; i++)); do
|
||||||
local c="${1:i:1}"
|
local c="${1:i:1}"
|
||||||
case $c in
|
case $c in
|
||||||
[a-zA-Z0-9.~_-]) printf "$c" ;;
|
[a-zA-Z0-9.~_-]) printf "$c" ;;
|
||||||
|
|||||||
@@ -45,7 +45,7 @@ function commit-pkm() {
|
|||||||
if [ -d $HOME/Documents/pkm ]; then
|
if [ -d $HOME/Documents/pkm ]; then
|
||||||
prevdir=$PWD
|
prevdir=$PWD
|
||||||
cd ~/Documents/pkm
|
cd ~/Documents/pkm
|
||||||
if [[ `git status --porcelain` ]]; then
|
if [[ $(git status --porcelain) ]]; then
|
||||||
echo "Changes detected, commiting..."
|
echo "Changes detected, commiting..."
|
||||||
git add -A && git commit -a -m 'Manual savepoint'
|
git add -A && git commit -a -m 'Manual savepoint'
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
autoload -Uz compinit
|
autoload -Uz compinit
|
||||||
compinit
|
compinit
|
||||||
|
|
||||||
function _add-sshkey(){
|
function _add-sshkey() {
|
||||||
local -a identities
|
local -a identities
|
||||||
|
|
||||||
# check for .ssh folder presence
|
# check for .ssh folder presence
|
||||||
@@ -9,7 +9,7 @@ function _add-sshkey(){
|
|||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
for id in $HOME/.ssh/id_ed25519_*; do
|
for id in $HOME/.ssh/id_ed25519_*; do
|
||||||
name=$(basename $id|cut -d'_' -f3|cut -d'.' -f1)
|
name=$(basename $id | cut -d'_' -f3 | cut -d'.' -f1)
|
||||||
[[ ${id:-3} != 'pub' ]] && identities+=$name
|
[[ ${id:-3} != 'pub' ]] && identities+=$name
|
||||||
done
|
done
|
||||||
|
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
# Source shell common
|
# Source shell common
|
||||||
for f in ~/.config/shell-common/*.sh; do
|
for f in ~/.config/shell-common/*.sh; do
|
||||||
source $f;
|
source $f
|
||||||
done
|
done
|
||||||
|
|
||||||
# Source zsh specific files
|
# Source zsh specific files
|
||||||
for f in ~/.config/zsh/*.zsh; do
|
for f in ~/.config/zsh/*.zsh; do
|
||||||
source $f;
|
source $f
|
||||||
done
|
done
|
||||||
|
|||||||
Reference in New Issue
Block a user