FreeBSD Bugzilla – Attachment 198201 Details for
Bug 232315
[NEW PORT] shells/poshinit : portable way of using the same shell environment with Bash / Zsh across FreeBSD / Linux / Cygwin
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
shar archive for poshinit
poshinit.shar (text/plain), 5.21 KB, created by
bourne.identity@hotmail.com
on 2018-10-16 11:03:11 UTC
(
hide
)
Description:
shar archive for poshinit
Filename:
MIME Type:
Creator:
bourne.identity@hotmail.com
Created:
2018-10-16 11:03:11 UTC
Size:
5.21 KB
patch
obsolete
># This is a shell archive. Save it in a file, remove anything before ># this line, and then unpack it by entering "sh file". Note, it may ># create directories; files and directories will be owned by you and ># have default permissions. ># ># This archive contains: ># ># shells/poshinit ># shells/poshinit/Makefile ># shells/poshinit/distinfo ># shells/poshinit/pkg-descr ># >echo c - shells/poshinit >mkdir -p shells/poshinit > /dev/null 2>&1 >echo x - shells/poshinit/Makefile >sed 's/^X//' >shells/poshinit/Makefile << '6478807b2a3d8dc27461825a16cce70d' >X# $FreeBSD$ >X >XPORTNAME = poshinit >XPORTVERSION = 1.0 >XCATEGORIES = shells >XMASTER_SITES = >X >XMAINTAINER = bourne.identity@hotmail.com >XCOMMENT = Portable shell environment across Bash/Zsh for FreeBSD/Linux/Cygwin >X >XNO_BUILD = yes >XNO_ARCH = yes >X >XDATA1 = poshinit >XDATA2 = poshinit.help >XDATA3 = poshinit.8 >XPLIST_FILES = bin/${PORTNAME} share/${PORTNAME}/${DATA1} share/${PORTNAME}/${DATA2} >X >Xdo-install: >X ${INSTALL_SCRIPT} ${WRKDIR}/${DATA1} ${STAGEDIR}${PREFIX}/bin/ >X ${MKDIR} ${STAGEDIR}${PREFIX}/share/${PORTNAME} >X ${INSTALL_DATA} ${WRKDIR}/${DATA1} ${STAGEDIR}${PREFIX}/share/${PORTNAME}/ >X ${INSTALL_DATA} ${WRKDIR}/${DATA2} ${STAGEDIR}${PREFIX}/share/${PORTNAME}/ >X ${INSTALL_MAN} ${WRKDIR}/${DATA3} ${STAGEDIR}${MANPREFIX}/man/man8 >X >X.include <bsd.port.mk> >6478807b2a3d8dc27461825a16cce70d >echo x - shells/poshinit/distinfo >sed 's/^X//' >shells/poshinit/distinfo << 'ce674f5dd39fb7629c07239d6657c6f1' >XTIMESTAMP = 1527016876 >XSHA256 (poshinit-1.0.tar.gz) = 0824b3bc902687c792178d7ae8eac68f5b2e69a788bfd187e991617d6f136e3b >XSIZE (poshinit-1.0.tar.gz) = 4740 >ce674f5dd39fb7629c07239d6657c6f1 >echo x - shells/poshinit/pkg-descr >sed 's/^X//' >shells/poshinit/pkg-descr << '2129c847ef038fffda5874a53c844d9d' >XYou want your shell stuff to work the same way even when you use a >Xdifferent shell, or even a different box. Right ? >X >XIf you use poshinit (Portable Shell Initialization), you can attain at >Xleast most of what you desire, perhaps even all. You can log out of Bash >Xand log in with Zsh (or vice versa) - and your aliases/exports/functions >Xwill continue to work as before. >X >XIt gets better - if someday you need to use a different box with a >Xdifferent OS, you can get your shell to work your 'normal' way in a >Xjiffy. Just save your $HOME/.shell directory on your primary box, and >Xpaste it over your second box's $HOME/.shell (after running poshinit >Xsetup script on the second box). The second box need not be the same >Xoperating system - poshinit works across FreeBSD / Linux / Cygwin. >X >XThe first time you use poshinit, you have to do the hard work in >Xsetting up your complete shell environment. But once you have done the >Xhard work, you can get the same environment every time in future with >Xvery little effort - just run poshinit setup script, and copy over your >Xmaster ~/.shell directory (or maybe even modify the poshinit script). >X >XIt is nice to know a bit about the layout utilized by poshinit. >X >X.bashrc is hard-linked as .bash_profile >X >X.zshrc and .bashrc source a common file .shellrc >X >XWhen using poshinit, do not modify .bashrc / .bash_profile / .zshrc >Xyourself. Instead, modify the tree under ~/.shell (see below). >X >X.shellrc uses the following tree in which the symbolic links level_2 >Xand level_3 get populated dynamically at the time of login. >X(Linux systems use level_2 & level_3. FreeBSD/Cygwin use level_2 only.) >X >X.shell >X|-- aliases >X|-- exports >X|-- functions >X|-- uponlogin >X|-- level_1.all >X|-- level_2 -> ? >X|-- level_2.cygwin >X|-- level_2.freebsd >X|-- level_2.linux >X|-- level_3 -> ? >X|-- level_3.arch >X|-- level_3.debian >X|-- level_3.redhat >X >XThe following utility aliases are available in a poshinit installation: >X(at least remember A and AA) >X >Xalias A="$EDITOR ~/.shell/aliases" >Xalias AA=". ~/.shell/aliases" >Xalias E="$EDITOR ~/.shell/exports" >Xalias EE=". ~/.shell/exports" >Xalias F="$EDITOR ~/.shell/functions" >Xalias FF=". ~/.shell/functions" >Xalias I="$EDITOR ~/.shell/uponlogin" >Xalias II=". ~/.shell/uponlogin" >Xalias L1="$EDITOR ~/.shell/level_1.all" >Xalias L2="$EDITOR ~/.shell/level_2" >Xalias L3="$EDITOR ~/.shell/level_3" (only for Linux) >X >XWhen using poshinit, remember that something is considered >Ximplementation-independent if it works the same across FreeBSD / Linux >X/ Cygwin. <alias ls="ls --color=auto"> is an implementaion-dependent >Xalias because it won't work on FreeBSD, where the alias would need to >Xbe defined as <alias ls="ls -G">. >X >XWith the above in mind : >X >X1) Put commands to be auto-executed upon login in ~/.shell/uponlogin >X2) Put all implementation-independent aliases in ~/.shell/aliases >X3) Put all implementation-independent exports in ~/.shell/exports >X4) Put all implementation-independent functions in ~/.shell/functions >X5) If you have any OS-dependent aliases/exports/functions, place them >X as below: >X >X FreeBSD / Cygwin : under ~/.shell/level_2 >X Linux distribution-independent definitions under ~/.shell/level_2 >X Linux distribution-dependent definitions under ~/.shell/level_3 >X >XIf you use poshinit installed via ports under FreeBSD, a copy of the >Xvirgin poshinit script is placed under /usr/local/share/poshinit >X(so you can alter the script under /usr/local/bin/ and then revert to >Xthe virgin if needed). >2129c847ef038fffda5874a53c844d9d >exit >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 232315
:
198201
|
198202
|
198203
|
198216
|
198217
|
198218
|
198230
|
198231
|
198232
|
198245
|
198246
|
198247
|
198278
|
198279
|
198280
|
198282
|
198283
|
198284
|
198295
|
198296
|
198297
|
198321
|
198329
|
198625
|
198679
|
198705
|
198707
|
198772
|
198825
|
198870
|
198916
|
198995
|
198999
|
199152
|
199189
|
199343
|
199349
|
199424
|
199900
|
200615