Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
D
dotfiles
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Iterations
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Code Review
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
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
Options
Browse Files
Download
Email Patches
Plain Diff
Show fuller path in fish prompt.
parent
4a2593bc
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
1 deletion
+12
-1
dot.config/fish/config.fish
dot.config/fish/config.fish
+12
-1
No files found.
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"
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
end
export LC_ALL=C
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