我正在運行archlinux(具體來說是arcolinux發行版)一切都很好,但是一個讓我煩惱的小問題是每次我打開終端時都會彈出我們在終端的頂部
“Linux pengu 5.15.25-1-lts x86_64 未知”
我知道這是一個帶有自定義標志的 uname 命令,但是我的 config.fish 中沒有這個命令(我使用魚殼(我用 bash i 運行魚),我知道每次打開魚殼時都會有這些東西在我的 config.fish 運行中,我有什么遺漏或什么嗎?這是我的 config.fish:
{
fish_vi_key_bindings
set VIRTUAL_ENV_DISABLE_PROMPT "1"
set -x MANPAGER "sh -c 'col -bx | bat -l man -p'"
## Export variable need for qt-theme
if type "qtile" >> /dev/null 2>&1
set -x QT_QPA_PLATFORMTHEME "qt5ct"
end
# Set settings for https://github.com/franciscolourenco/done
set -U __done_min_cmd_duration 10000
set -U __done_notification_urgency_level low
## Environment setup
# Apply .profile: use this to put fish compatible .profile stuff in
if test -f ~/.fish_profile
source ~/.fish_profile
end
# Add ~/.local/bin to PATH
if test -d ~/.local/bin
if not contains -- ~/.local/bin $PATH
set -p PATH ~/.local/bin
end
end
# Add depot_tools to PATH
if test -d ~/Applications/depot_tools
if not contains -- ~/Applications/depot_tools $PATH
set -p PATH ~/Applications/depot_tools
end
end
set -p PATH ~/.scripts
set -p PATH /home/omar/eclipse/java-2021-12/eclipse
set -p PATH ~/bin
## Starship prompt
if status --is-interactive
source ("/usr/bin/starship" init fish --print-full-init | psub)
end
## Advanced command-not-found hook
#source /usr/share/doc/find-the-command/ftc.fish
## Functions
# Functions needed for !! and !$ https://github.com/oh-my-fish/plugin-bang-bang
function __history_previous_command
switch (commandline -t)
case "!"
commandline -t $history[1]; commandline -f repaint
case "*"
commandline -i !
end
end
function __history_previous_command_arguments
switch (commandline -t)
case "!"
commandline -t ""
commandline -f history-token-search-backward
case "*"
commandline -i '$'
end
end
if [ "$fish_key_bindings" = fish_vi_key_bindings ];
bind -Minsert ! __history_previous_command
bind -Minsert '$' __history_previous_command_arguments
else
bind ! __history_previous_command
bind '$' __history_previous_command_arguments
end
# Fish command history
function history
builtin history --show-time='%F %T '
end
function backup --argument filename
cp $filename $filename.bak
end
# Copy DIR1 DIR2
function copy
set count (count $argv | tr -d \n)
if test "$count" = 2; and test -d "$argv[1]"
set from (echo $argv[1] | trim-right /)
set to (echo $argv[2])
command cp -r $from $to
else
command cp $argv
end
end
## Useful aliases
#Aliases to setbrightness
alias setbright1='xrandr --output HDMI-0 --brightness 1.00' #Sets the brightness to 1.00
alias setbright75='xrandr --output HDMI-0 --brightness 0.75' #Sets the brightness to 0.75
alias setbright50='xrandr --output HDMI-0 --brightness 0.50' #Sets the brightness to 0.50
alias setbright40='xrandr --output HDMI-0 --brightness 0.40' #Sets the brightness to 0.40
alias setbright30='xrandr --output HDMI-0 --brightness 0.30' #Sets the brightness to 0.30
# Replace ls with exa
alias ls='exa -al --color=always --group-directories-first --icons' # preferred listing
alias la='exa -a --color=always --group-directories-first --icons' # all files and dirs
alias ll='exa -l --color=always --group-directories-first --icons' # long format
alias lt='exa -aT --color=always --group-directories-first --icons' # tree listing
alias l.="exa -a | egrep '^\.'" # show only dotfiles
# Aliases for quickly accessing config files(fish, bash, alacritty,etc..)
alias cf='vim ~/.config/fish/config.fish' # for quickly accessing fish config file
alias cb='vim .bashrc' # for quickly accessing bash config file
alias ca='vim ~/.config/alacritty/alacritty.yml' # for quickly acssesing alacritty config file
alias ck='vim ~/.config/kitty/kitty.conf'
alias cw='vim ~/.config/awesome/rc.lua'
# Replace some more things with better alternatives
alias cat='bat --style header --style rules --style snip --style changes --style header'
[ ! -x /usr/bin/yay ] && [ -x /usr/bin/paru ] && alias yay='paru'
#Media player utilities
alias pause='playerctl -p spotify pause'
alias play='playerctl -p spotify play'
# Common use
alias book='/home/omar/.scripts/books.sh'
alias poweroff='systemctl poweroff'
alias reboot='systemctl reboot'
alias grubup="sudo update-grub"
alias fixpacman="sudo rm /var/lib/pacman/db.lck"
alias tarnow='tar -acf '
alias untar='tar -zxvf '
alias wget='wget -c '
alias rmpkg="sudo pacman -Rdd"
alias psmem='ps auxf | sort -nr -k 4'
alias psmem10='ps auxf | sort -nr -k 4 | head -10'
alias upd='/usr/bin/update'
alias ..='cd ..'
alias ...='cd ../..'
alias ....='cd ../../..'
alias .....='cd ../../../..'
alias ......='cd ../../../../..'
alias dir='dir --color=auto'
alias vdir='vdir --color=auto'
alias grep='grep --color=auto'
alias fgrep='fgrep --color=auto'
alias egrep='egrep --color=auto'
alias hw='hwinfo --short' # Hardware Info
alias big="expac -H M '%m\t%n' | sort -h | nl" # Sort installed packages according to size in MB
alias gitpkg='pacman -Q | grep -i "\-git" | wc -l' # List amount of -git packages
# Get fastest mirrors
alias mirror="sudo reflector -f 30 -l 30 --number 10 --verbose --save /etc/pacman.d/mirrorlist"
alias mirrord="sudo reflector --latest 50 --number 20 --sort delay --save /etc/pacman.d/mirrorlist"
alias mirrors="sudo reflector --latest 50 --number 20 --sort score --save /etc/pacman.d/mirrorlist"
alias mirrora="sudo reflector --latest 50 --number 20 --sort age --save /etc/pacman.d/mirrorlist"
# Help people new to Arch
alias apt='man pacman'
alias apt-get='man pacman'
alias please='sudo'
alias tb='nc termbin.com 9999'
# Cleanup orphaned packages
alias cleanup='sudo pacman -Rns (pacman -Qtdq)'
# Get the error messages from journalctl
alias jctl="journalctl -p 3 -xb"
# Recent installed packages
alias rip="expac --timefmt='%Y-%m-%d %T' '%l\t%n %v' | sort | tail -200 | nl"
#Cool terminal stuff(pipes, convo, etc...)
alias pipes='cd pipes.sh;./pipes.sh';cd
## Run paleofetch if session is interactive
#if status --is-interactive
#colorscript random
#end
}
我試圖通過在我的魚殼上呼叫類似 strace 的東西來除錯問題,但它只是重新啟動了我的魚殼,我還撰寫了一個小腳本,我在其中創建了一個 while 回圈并執行了這個命令:ps -ax | grep unname; sleep 0.1 這應該給我 uname 命令的任何實體,并一遍又一遍地運行我的魚殼,但是沒有 uname 實體我真的對此感到困惑
uj5u.com熱心網友回復:
strace可以使用以下方法附加到行程-p:
-p pid trace process with process id PID, may be repeated
這樣你就可以附加到你正在運行的行程中。
您可能還會發現有用
-f follow forks
-ff follow forks with output into separate files
如果您附加到父行程。
uj5u.com熱心網友回復:
fish_trace你可以通過設定變數讓fish輸出它運行的命令。例子:
fish_trace=1 fish
這在有關除錯 fish的檔案中有所提及。
uj5u.com熱心網友回復:
我想通了,雖然沒有跟蹤魚殼系統呼叫或類似的東西,但我意識到我正在使用 oh-my-fish 插件或框架,它正在加載一個顯示不需要的訊息的主題,盡管我至少現在感謝您的提示知道如何追蹤魚殼
轉載請註明出處,本文鏈接:https://www.uj5u.com/net/436282.html
上一篇:與C 進行串行通信時的緩沖區問題
