Comments (5)
Hi @2Belette. In steeef.zsh-theme, replace %m
by %2m
two have 2 components displayed (or replace by the number you prefer), or by %M
to have the full machine hostname displayed.
See more at the Prompt-Expansion documentation.
from steeef.
Thanks @ericbn ! I learned something :)
For my usecase it doesn't work as my machine has short name in hostname and I would need to find a way to append the domain name but I can't find a way.
Is there a way to parse anything? like echoing something
from steeef.
Doesn't %M
work?
from steeef.
@lnicola it is giving me the same result as %m
for example :
username : belette
name of the computer : x1
domain name on resolv.conf (mydomain.com)
zim prompt with %m :belette at x1 in ~$
zim prompt with %M : belette at x1 in ~$
No difference
from steeef.
Note that the domain
(called search
now) line in resolv.conf
doesn't set the domain name of your current computer, but configures the DNS resolver. The FQDN is in /etc/hostname
(or you can check it with hostnamectl
if you're running systemd
).
I think you can also embed commands in the prompt (PS1='$(ls)'
), but reading that file on each prompt would be quite slow. I would rather make sure the domain is configured correctly instead.
from steeef.
Related Issues (3)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from steeef.