Skip to content

Commit a55c39f

Browse files
committed
feat: configure terminal title prefix and forgit log shortcut
Generated-by: aiautocommit
1 parent b18f528 commit a55c39f

1 file changed

Lines changed: 17 additions & 0 deletions

File tree

‎.exports‎

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,15 @@ export FZF_CTRL_T_OPTS="
3131
--walker-skip .git,node_modules,target,__pycache__,venv,.venv,dist,build
3232
"
3333

34+
# ^G = sha-url
35+
export FORGIT_LOG_FZF_OPTS='
36+
--bind="ctrl-g:execute-silent(
37+
sha=$(echo {} | grep -Eo [a-f0-9]{40} | head -1);
38+
[ -n \"$sha\" ] && \
39+
gh url \"$sha\" | tee /dev/tty
40+
)+abort"
41+
'
42+
3443
# customize fzf defaults (so we can keep page up/down) + some keybindings
3544
export GIT_FUZZY_FZF_DEFAULT_OPTS="\
3645
--layout=reverse \
@@ -88,6 +97,14 @@ export HISTSIZE=1000000
8897
# Make some commands not show up in history
8998
export HISTORY_IGNORE="(ls*|pwd|exit|cd*|gc*|* --help|history|j *|jj *|glo|gfu|g st|g ss|sudo hostile*|*throttle-internet*)"
9099

100+
# configure terminal title
101+
# always start with the basename of the current directory
102+
export ZSH_TAB_TITLE_PREFIX="%1~ | "
103+
# include the folder name when a process is running
104+
export ZSH_TAB_TITLE_CONCAT_FOLDER_PROCESS=true
105+
# only show the folder name in the tab title
106+
export ZSH_TAB_TITLE_ONLY_FOLDER=true
107+
91108
# env config for compatibility with omz
92109
export ZSH=${HOME}/.zsh
93110
export ZSH_CACHE_DIR=${ZSH}/cache

0 commit comments

Comments
 (0)