浏览代码

Merge branch 'master' of github.com:10sr/dotfiles

pull/1/head
10sr 12 年前
父节点
当前提交
1129664b19
共有 2 个文件被更改,包括 19 次插入2 次删除
  1. +18
    -2
      bashrc
  2. +1
    -0
      setup.sh

+ 18
- 2
bashrc 查看文件

@@ -235,7 +235,7 @@ cd(){
__dirs_rm_dup(){
for d in "$@"
do
local next="$(realpath --no-symlinks "$d")"
local next="$(__realpath --strip "$d")"
for l in $(\dirs -v -l | cut -d "
" -f 2- | \grep -x " *[0-9]\+ \+${next}" | \grep -o "^ *[0-9]\+ " | tac)
do
@@ -244,6 +244,22 @@ __dirs_rm_dup(){
done
}

__realpath(){
if type realpath >/dev/null 2>&1
then
command realpath "$@"
else
while ! test -d $1
do
shift
done
local d="$OLDPWD"
command cd "$1"
echo "$PWD"
command cd "$d"
fi
}

dh(){
if test $# -eq 0
then
@@ -421,7 +437,7 @@ o(){
else
for f in "$@"
do
open_file "$f"
open_file "$(realpath "$f")"
done
fi
}


+ 1
- 0
setup.sh 查看文件

@@ -61,6 +61,7 @@ git_config(){
# git config --global alias.my-ls "ls-files | xargs ls"
# git config --global alias.ll "!git ls-files | xargs ls -l -CFG --color=auto --time-style=long-iso"
git config --global alias.addi "add -i"
git config --global alias.clean-p "!test -z \"\$(git status -s -uno)\""
if false iswindows; then
git config --global core.fileMode false
fi


正在加载...
取消
保存