Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Jørn Åne de Jong
dotfiles
Commits
b3aa5ace
Commit
b3aa5ace
authored
Sep 13, 2016
by
Jørn Åne
Committed by
Jørn Åne
Nov 09, 2017
Browse files
Show fuller path in fish prompt.
parent
4a2593bc
Changes
1
Hide whitespace changes
Inline
Side-by-side
dot.config/fish/config.fish
View file @
b3aa5ace
function prompt_pwd_full
set -q fish_prompt_pwd_dir_length; or set -l fish_prompt_pwd_dir_length 1
if [ $fish_prompt_pwd_dir_length -eq 0 ]
set -l fish_prompt_pwd_dir_length 99999
end
set -l realhome ~
echo $PWD | sed -e "s|^$realhome|~|" -e 's-\([^/.]{'"$fish_prompt_pwd_dir_length"'}\)[^/]*/-\1/-g'
end
function fish_prompt -d "Write out the prompt"
printf '\n%s%s%s%s@%s:%s%s%s\n> ' (set_color normal) (set_color --bold) (whoami) (set_color normal) (hostname) (set_color --bold --background blue white) (prompt_pwd) (set_color normal)
printf '\n%s%s%s%s@%s:%s%s%s\n> ' (set_color normal) (set_color --bold) (whoami) (set_color normal) (hostname) (set_color --bold --background blue white) (prompt_pwd
_full
) (set_color normal)
end
export LC_ALL=C
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment