mirror of
https://github.com/nikdoof/dotfiles.git
synced 2025-12-13 01:32:30 +00:00
[shell-common] Cleanup tabs vs spaces
This commit is contained in:
@@ -2,5 +2,3 @@
|
||||
if [ -f $HOME/.bashrc ]; then
|
||||
source $HOME/.bashrc
|
||||
fi
|
||||
|
||||
|
||||
|
||||
@@ -7,10 +7,10 @@ fi
|
||||
|
||||
# Source shell common
|
||||
for f in ~/.config/shell-common/*.sh; do
|
||||
source $f;
|
||||
source $f
|
||||
done
|
||||
|
||||
# Source bash specific files
|
||||
for f in ~/.config/bash/*.bash; do
|
||||
source $f;
|
||||
source $f
|
||||
done
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
# 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
|
||||
|
||||
local length="${#1}"
|
||||
for (( i = 0; i < length; i++ )); do
|
||||
for ((i = 0; i < length; i++)); do
|
||||
local c="${1:i:1}"
|
||||
case $c in
|
||||
[a-zA-Z0-9.~_-]) printf "$c" ;;
|
||||
|
||||
@@ -45,7 +45,7 @@ function commit-pkm() {
|
||||
if [ -d $HOME/Documents/pkm ]; then
|
||||
prevdir=$PWD
|
||||
cd ~/Documents/pkm
|
||||
if [[ `git status --porcelain` ]]; then
|
||||
if [[ $(git status --porcelain) ]]; then
|
||||
echo "Changes detected, commiting..."
|
||||
git add -A && git commit -a -m 'Manual savepoint'
|
||||
else
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
autoload -Uz compinit
|
||||
compinit
|
||||
|
||||
function _add-sshkey(){
|
||||
function _add-sshkey() {
|
||||
local -a identities
|
||||
|
||||
# check for .ssh folder presence
|
||||
@@ -9,7 +9,7 @@ function _add-sshkey(){
|
||||
return
|
||||
fi
|
||||
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
|
||||
done
|
||||
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
# Source shell common
|
||||
for f in ~/.config/shell-common/*.sh; do
|
||||
source $f;
|
||||
source $f
|
||||
done
|
||||
|
||||
# Source zsh specific files
|
||||
for f in ~/.config/zsh/*.zsh; do
|
||||
source $f;
|
||||
source $f
|
||||
done
|
||||
|
||||
Reference in New Issue
Block a user