add bash config
This commit is contained in:
14
bash/.add-on
Normal file
14
bash/.add-on
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
## 更新配置
|
||||||
|
dotu() {
|
||||||
|
# 使用 () 包裹命令会在子进程中运行,执行完后当前终端路径不会改变
|
||||||
|
(
|
||||||
|
cd "$HOME/.flinty" || exit
|
||||||
|
if git pull; then
|
||||||
|
echo "Git updated."
|
||||||
|
fi
|
||||||
|
)
|
||||||
|
|
||||||
|
# 在主进程刷新配置
|
||||||
|
source ~/.bashrc
|
||||||
|
echo "Config reloaded successfully!"
|
||||||
|
}
|
||||||
@@ -1,3 +1,4 @@
|
|||||||
|
## 替换 ls 默认行为
|
||||||
function ls --description 'alias ls to eza if possible'
|
function ls --description 'alias ls to eza if possible'
|
||||||
if type -q eza
|
if type -q eza
|
||||||
eza -la --icons $argv
|
eza -la --icons $argv
|
||||||
@@ -6,6 +7,7 @@ function ls --description 'alias ls to eza if possible'
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
## 更新配置
|
||||||
function dotu
|
function dotu
|
||||||
set -l current_dir (pwd)
|
set -l current_dir (pwd)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user